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,9 +46,7 @@ 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);