* Filemanager/Sharing: fix PHP 7.1 error causing auth request to popup

Session only stores app-names and $GLOBALS[egw_info][user][apps] gets restored from $GLOBALS[egw_info][apps] for the allowed app-names. Check if we need to restore from installed apps array was using is_array($GLOBALS[egw_info][user][apps][api]) instead or isset($GLOBALS[egw_info][user][apps][0]), as check if it is a real, non associative array
This commit is contained in:
Ralf Becker 2018-02-14 09:03:14 +01:00
parent f166fbdd46
commit f4927d7e0b

View File

@ -963,7 +963,7 @@ class Session
$GLOBALS['egw']->applications->read_installed_apps();
// session only stores app-names, restore apps from egw_info[apps]
if (!is_array($GLOBALS['egw_info']['user']['apps']['api']))
if (isset($GLOBALS['egw_info']['user']['apps'][0]))
{
$GLOBALS['egw_info']['user']['apps'] = array_intersect_key($GLOBALS['egw_info']['apps'], array_flip($GLOBALS['egw_info']['user']['apps']));
}