mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 00:58:55 +01:00
fixing two PHP Warnings
This commit is contained in:
parent
99a223a5ad
commit
1f7682d87a
@ -718,12 +718,12 @@ class DateTime extends \DateTime
|
||||
public static function getUserTimezones($extra=null)
|
||||
{
|
||||
$tz = $GLOBALS['egw_info']['user']['preferences']['common']['tz'];
|
||||
$user_tzs = explode(',',$GLOBALS['egw_info']['user']['preferences']['common']['tz_selection']);
|
||||
if (count($user_tzs) <= 1)
|
||||
$user_tzs = $GLOBALS['egw_info']['user']['preferences']['common']['tz_selection'];
|
||||
if (!is_array($user_tzs))
|
||||
{
|
||||
$user_tzs = $tz ? array($tz) : array();
|
||||
$user_tzs = $user_tzs ? explode(',', $user_tzs) : array();
|
||||
}
|
||||
if ($tz && !in_array($tz,$user_tzs))
|
||||
if ($tz && !in_array($tz, $user_tzs))
|
||||
{
|
||||
$user_tzs = array_merge(array($tz),$user_tzs);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user