mirror of
https://github.com/silverstripe/silverstripe-spamprotection.git
synced 2024-10-22 14:05:59 +02:00
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:
parent
3c9b62645f
commit
59ef9b376d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user