From 52e8aff9ae9a8cd5edd37217e6b51ea50ffe23ea Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 21 Mar 2021 21:10:37 +0100 Subject: [PATCH] fix PHP 8 Fatal error undefined constant EGW_API_INC --- api/src/autoload.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/autoload.php b/api/src/autoload.php index 2e18707be9..58a7040ede 100755 --- a/api/src/autoload.php +++ b/api/src/autoload.php @@ -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