mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 09:05:16 +01:00
fixed 5.4 PHP Warning: Illegal offset type
This commit is contained in:
parent
565a2be7d6
commit
493bf3bcd0
@ -558,6 +558,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'];
|
||||
|
||||
@ -566,11 +572,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