From 3c9b62645feb01cd0fa3b386ba49fdbb6f43a32e Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Sun, 16 Aug 2009 22:36:09 +0000 Subject: [PATCH] BUGFIX If $protector is not an object, create it --- code/SpamProtectorManager.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/SpamProtectorManager.php b/code/SpamProtectorManager.php index cd3d7f3..eb233af 100644 --- a/code/SpamProtectorManager.php +++ b/code/SpamProtectorManager.php @@ -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) {