mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-10 07:21:04 +01:00
Don't give an exception on null values
This commit is contained in:
parent
4600445527
commit
c0962b1ce7
@ -59,10 +59,14 @@ class etemplate_widget_link extends etemplate_widget
|
|||||||
$form_name = self::form_name($cname, $this->id);
|
$form_name = self::form_name($cname, $this->id);
|
||||||
$value =& self::get_array(self::$request->content, $form_name, true);
|
$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));
|
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'];
|
$app = $value['to_app'];
|
||||||
$id = $value['to_id'];
|
$id = $value['to_id'];
|
||||||
|
Loading…
Reference in New Issue
Block a user