fix PHP 8 Fatal error undefined constant EGW_API_INC

This commit is contained in:
Ralf Becker 2021-03-21 21:10:37 +01:00
parent 3e278b3bd3
commit 52e8aff9ae

View File

@ -85,9 +85,9 @@ spl_autoload_register(function($class)
// classes using the new naming schema app_class_name, eg. admin_cmd
isset($components[0]) && file_exists($file = EGW_INCLUDE_ROOT.'/'.$app.'/inc/class.'.$app.'_'.$components[0].'.inc.php') ||
// eGW api classes using the old naming schema, eg. html
file_exists($file = EGW_API_INC.'/class.'.$class.'.inc.php') ||
// eGW api classes containing multiple classes in on file, eg. egw_exception
isset($components[0]) && file_exists($file = EGW_API_INC.'/class.'.$app.'_'.$components[0].'.inc.php') ||
defined('EGW_API_INC') && (file_exists($file = EGW_API_INC.'/class.'.$class.'.inc.php') ||
// eGW api classes containing multiple classes in on file, eg. egw_exception
isset($components[0]) && file_exists($file = EGW_API_INC.'/class.'.$app.'_'.$components[0].'.inc.php')) ||
// eGW eTemplate classes using the old naming schema, eg. etemplate
file_exists($file = EGW_INCLUDE_ROOT.'/etemplate/inc/class.'.$class.'.inc.php') ||
// classes with an underscore in their name