From 7ae4d4430858664f5085f24322d888b4e64fa2d4 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 2 Apr 2021 19:34:11 +0200 Subject: [PATCH] fix PHP 8 errors --- api/src/Html.php | 2 +- api/src/autoload.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/src/Html.php b/api/src/Html.php index 4b8fa8e2d3..74e9194cc8 100644 --- a/api/src/Html.php +++ b/api/src/Html.php @@ -162,7 +162,7 @@ class Html $name .= '[]'; } } - elseif($multiple < 0) + elseif((int)$multiple < 0) { $options .= ' size="'.abs($multiple).'"'; } diff --git a/api/src/autoload.php b/api/src/autoload.php index c95bd9efa3..3c719b18e9 100755 --- a/api/src/autoload.php +++ b/api/src/autoload.php @@ -90,7 +90,8 @@ spl_autoload_register(function($class) // 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 - !file_exists(EGW_INCLUDE_ROOT.'/'.$app) && file_exists(EGW_INCLUDE_ROOT.'/'.$app.'_'.$components[0]) && + !file_exists(EGW_INCLUDE_ROOT.'/'.$app) && isset($components[0]) && + file_exists(EGW_INCLUDE_ROOT.'/'.$app.'_'.$components[0]) && file_exists($file = EGW_INCLUDE_ROOT.'/'.$app.'_'.$components[0].'/inc/class.'.$class.'.inc.php') || // include PEAR and PSR0 classes from include_path // need to use include (not include_once) as eg. a previous included EGW_API_INC/horde/Horde/String.php causes