Avoid warning when input is not an array - caused by no cfs

This commit is contained in:
Nathan Gray 2012-03-29 22:57:00 +00:00
parent 3bce9fccc3
commit 9d179df719

View File

@ -227,6 +227,7 @@ class etemplate_widget_customfields extends etemplate_widget_transformer
} }
$value_in = self::get_array($content, $form_name); $value_in = self::get_array($content, $form_name);
if(is_array($value_in)) {
foreach($value_in as $field => $value) foreach($value_in as $field => $value)
{ {
if ((string)$value === '' && $this->attrs['needed']) if ((string)$value === '' && $this->attrs['needed'])
@ -240,4 +241,5 @@ class etemplate_widget_customfields extends etemplate_widget_transformer
} }
} }
} }
}
} }