mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 23:29:31 +01:00
fixed 5.4 PHP Warning: Illegal offset type
This commit is contained in:
parent
c30f5d442c
commit
54a2a21a4f
@ -527,6 +527,12 @@ class accounts
|
||||
*/
|
||||
function name2id($name,$which='account_lid',$account_type=null)
|
||||
{
|
||||
// Don't bother searching for empty or non-scalar account_lid
|
||||
if(empty($name) || !is_scalar($name))
|
||||
{
|
||||
return False;
|
||||
}
|
||||
|
||||
self::setup_cache();
|
||||
$name_list = &self::$cache['name_list'];
|
||||
|
||||
@ -535,11 +541,6 @@ class accounts
|
||||
return $name_list[$which][$name];
|
||||
}
|
||||
|
||||
// Don't bother searching for empty account_lid
|
||||
if(empty($name))
|
||||
{
|
||||
return False;
|
||||
}
|
||||
return $name_list[$which][$name] = $this->backend->name2id($name,$which,$account_type);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user