From 9e62b912176f502265202fc903e3d0915fe9369f Mon Sep 17 00:00:00 2001 From: Garion Herman Date: Thu, 30 Apr 2015 12:25:54 +1200 Subject: [PATCH] BUGFIX: Stop attempting to filter an UnsavedRelationList --- code/EditableSpamProtectionField.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/EditableSpamProtectionField.php b/code/EditableSpamProtectionField.php index b056894..ec6caa9 100644 --- a/code/EditableSpamProtectionField.php +++ b/code/EditableSpamProtectionField.php @@ -73,6 +73,10 @@ if(class_exists('EditableFormField')) { $protector = FormSpamProtectionExtension::get_protector(); if (!$protector) return $fields; + if ($this->Parent()->Fields() instanceof UnsavedRelationList) { + return $fields; + } + // Each other text field in this group can be assigned a field mapping $mapGroup = FieldGroup::create(_t( 'EditableSpamProtectionField.SPAMFIELDMAPPING',