MINOR: PHP notice fix - undefined variable

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.2.2@53197 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2008-04-22 03:55:34 +00:00 committed by Sam Minnee
parent 6aaec39afa
commit b9aaed37f5

View File

@ -31,6 +31,7 @@ class FieldSet extends DataObjectSet {
$name = $field->Name(); $name = $field->Name();
if(isset($list[$name])) { if(isset($list[$name])) {
if($this->form) $errSuffix = " in your '{$this->form->class}' form called '" . $this->form->Name() . "'"; if($this->form) $errSuffix = " in your '{$this->form->class}' form called '" . $this->form->Name() . "'";
else $errSuffix = '';
user_error("collateDataFields() I noticed that a field called '$name' appears twice$errSuffix.", E_USER_ERROR); user_error("collateDataFields() I noticed that a field called '$name' appears twice$errSuffix.", E_USER_ERROR);
} }
$list[$name] = $field; $list[$name] = $field;