BUGFIX If $protector is not an object, create it

This commit is contained in:
Sean Harvey 2009-08-16 22:36:09 +00:00
parent c2315c1618
commit 3c9b62645f
1 changed files with 4 additions and 1 deletions

View File

@ -46,7 +46,10 @@ class SpamProtectorManager {
user_error("Spam Protector class '$protectorClass' does not exist. Please define a valid Spam Protector", E_USER_WARNING);
}
$protector = new $protectorClass();
if(!is_object($protector)) {
$protector = new $protectorClass();
}
try {
$check = $protector->updateForm($form, $before, $fieldsToSpamServiceMapping);
} catch (Exception $e) {