checking if apparray exist in __autoload, before looping through

This commit is contained in:
Klaus Leithoff 2008-03-07 10:18:17 +00:00
parent cc6f013f6f
commit 85c7be0259

View File

@ -1327,12 +1327,14 @@ function __autoload($class)
} }
else else
{ {
foreach($GLOBALS['egw_info']['apps'] as $lapp => $appvalue) if (is_array($GLOBALS['egw_info']['apps'])) {
{ foreach($GLOBALS['egw_info']['apps'] as $lapp => $appvalue)
if (file_exists($file = EGW_INCLUDE_ROOT.'/'.$lapp.'/inc/class.'.$class.'.inc.php'))
{ {
#echo "$lapp,$class<br>"; if (file_exists($file = EGW_INCLUDE_ROOT.'/'.$lapp.'/inc/class.'.$class.'.inc.php'))
include_once($file); {
#echo "$lapp,$class<br>";
include_once($file);
}
} }
} }
} }