diff --git a/phpgwapi/inc/common_functions.inc.php b/phpgwapi/inc/common_functions.inc.php index 53b120d613..345809ef0c 100755 --- a/phpgwapi/inc/common_functions.inc.php +++ b/phpgwapi/inc/common_functions.inc.php @@ -1327,12 +1327,14 @@ function __autoload($class) } else { - foreach($GLOBALS['egw_info']['apps'] as $lapp => $appvalue) - { - if (file_exists($file = EGW_INCLUDE_ROOT.'/'.$lapp.'/inc/class.'.$class.'.inc.php')) + if (is_array($GLOBALS['egw_info']['apps'])) { + foreach($GLOBALS['egw_info']['apps'] as $lapp => $appvalue) { - #echo "$lapp,$class
"; - include_once($file); + if (file_exists($file = EGW_INCLUDE_ROOT.'/'.$lapp.'/inc/class.'.$class.'.inc.php')) + { + #echo "$lapp,$class
"; + include_once($file); + } } } }