mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
Fix problem with false/0 values failing validation
This commit is contained in:
parent
70126e5698
commit
b9a43091dc
@ -97,6 +97,10 @@ class etemplate_widget_menupopup extends etemplate_widget
|
||||
}
|
||||
foreach((array) $value as $val)
|
||||
{
|
||||
// array_key_exists() (used below) is inconsistent in how it handles empty/false
|
||||
// It needs a string or integer.
|
||||
if(!$val && $val !== 0) $val = '';
|
||||
|
||||
// Special for select-account - selOptions doesn't always load all accounts
|
||||
if($this->attrs['type'] == 'select-account' && !$GLOBALS['egw']->accounts->visible($val) && !isset($allowed[$val]) ||
|
||||
$this->attrs['type'] != 'select-account' && !array_key_exists($val,$allowed))
|
||||
|
Loading…
Reference in New Issue
Block a user