From 37463980252bbf69ab45ecc01c940f96140bb051 Mon Sep 17 00:00:00 2001 From: Ed Date: Sat, 24 Mar 2012 13:38:13 -0300 Subject: [PATCH] Fixed hard crash caused by the form not being stored on the field in SS3.0 --- code/SpamProtectorField.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/code/SpamProtectorField.php b/code/SpamProtectorField.php index 677b814..5bba25f 100644 --- a/code/SpamProtectorField.php +++ b/code/SpamProtectorField.php @@ -12,6 +12,14 @@ abstract class SpamProtectorField extends FormField { * @var array */ private $spamFieldMapping = array(); + + function __construct($name, $title = null, $value = null, $form = null, $rightTitle = null) { + parent::__construct($name, $title, $value); + + if(!empty($form)) { + $this->form=$form; + } + } /**