BUGFIX If spam protector class doesn't exist, a warning is thrown - however, it still tries to create the object in live mode -

don't allow this
This commit is contained in:
Sean Harvey 2009-08-16 22:42:26 +00:00
parent 3c9b62645f
commit 59ef9b376d

View File

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