forked from extern/egroupware
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)
|
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
|
// 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]) ||
|
if($this->attrs['type'] == 'select-account' && !$GLOBALS['egw']->accounts->visible($val) && !isset($allowed[$val]) ||
|
||||||
$this->attrs['type'] != 'select-account' && !array_key_exists($val,$allowed))
|
$this->attrs['type'] != 'select-account' && !array_key_exists($val,$allowed))
|
||||||
|
Loading…
Reference in New Issue
Block a user