BUGFIX: use second argument only if its an array

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90927 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andreas Piening 2009-11-05 20:31:41 +00:00
parent 050b6057ce
commit e3f4c266e3

View File

@ -977,7 +977,7 @@ class Form extends RequestHandler {
if($dataFields) foreach($dataFields as $field) { if($dataFields) foreach($dataFields as $field) {
// Skip fields that have been exlcuded // Skip fields that have been exlcuded
if($fieldList && !in_array($field->Name(), $fieldList)) continue; if($fieldList && is_array($fieldList) && !in_array($field->Name(), $fieldList)) continue;
$saveMethod = "save{$field->Name()}"; $saveMethod = "save{$field->Name()}";