Don't give an exception on null values

This commit is contained in:
Nathan Gray 2011-09-09 16:46:55 +00:00
parent 4600445527
commit c0962b1ce7

View File

@ -59,10 +59,14 @@ class etemplate_widget_link extends etemplate_widget
$form_name = self::form_name($cname, $this->id);
$value =& self::get_array(self::$request->content, $form_name, true);
if(!is_array($value))
if($value && !is_array($value))
{
throw new egw_exception_wrong_parameter("Wrong value sent to link widget, needs to be an array. ".array2string($value));
}
elseif (!$value)
{
return;
}
$app = $value['to_app'];
$id = $value['to_id'];