mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 18:03:39 +01:00
Check variable existance and type to avoid some warnings
This commit is contained in:
parent
60ad22de68
commit
cd6ff18379
@ -29,6 +29,8 @@ class etemplate_widget_historylog extends etemplate_widget
|
||||
{
|
||||
$form_name = self::form_name($cname, $this->id);
|
||||
|
||||
if(is_array(self::$request->content[$form_name]['status-widgets']))
|
||||
{
|
||||
foreach(self::$request->content[$form_name]['status-widgets'] as $key => $type)
|
||||
{
|
||||
if(!is_array($type))
|
||||
@ -53,4 +55,5 @@ class etemplate_widget_historylog extends etemplate_widget
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -376,11 +376,17 @@ class etemplate_widget_menupopup extends etemplate_widget
|
||||
}
|
||||
|
||||
// Make sure all values are present, even if not normally sent (according to preferences)
|
||||
if(is_array($value))
|
||||
{
|
||||
$remaining = array_diff_key($value, $options);
|
||||
}
|
||||
if(is_array($remaining))
|
||||
{
|
||||
foreach($remaining as $id)
|
||||
{
|
||||
$options[$id] = !$id && !is_numeric($rows) ? lang($rows) : self::accountInfo($id,null,$type2,$type=='both');
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'select-year': // options: #rows,#before(default=3),#after(default=2)
|
||||
|
Loading…
Reference in New Issue
Block a user