From 5e5c418339c62d34527687cc720a87ec41576d0b Mon Sep 17 00:00:00 2001 From: Peter Kelly Date: Thu, 26 Jan 2023 16:38:23 +0000 Subject: [PATCH] Update dispatcher.php the require() on line 270 makes calls to mi_command() which passes the $errors variable by reference. This then gets passed all over the place and is expected to be an array, not a string. Array initialisation on line 269 is required because $errors is defined as a string previously, this causes a type error when you try to load the dispatcher page: PHP Fatal error: Uncaught Error: [] operator not supported for strings --- web/tools/system/dispatcher/dispatcher.php | 1 + 1 file changed, 1 insertion(+) diff --git a/web/tools/system/dispatcher/dispatcher.php b/web/tools/system/dispatcher/dispatcher.php index 865b40f4..63a19e03 100755 --- a/web/tools/system/dispatcher/dispatcher.php +++ b/web/tools/system/dispatcher/dispatcher.php @@ -266,6 +266,7 @@ # start main # ############## +$errors=[]; require("template/".$page_id.".main.php"); if ($errors!="") echo('
'.$errors.'
'); if ($info!="") echo('
'.$info.'
');