From 7d37d7a5213d8c650c42836e8d95b2dc58f4f4af Mon Sep 17 00:00:00 2001 From: fusionate Date: Tue, 16 May 2023 18:39:41 +0000 Subject: [PATCH] Require - Updates for PHP 8.1 --- resources/require.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/require.php b/resources/require.php index 01cab5af15..95078cdf4e 100644 --- a/resources/require.php +++ b/resources/require.php @@ -35,12 +35,12 @@ $_SERVER["PROJECT_PATH"] = $conf['project.path']; if (isset($conf['project.path'])) { $_SERVER["PROJECT_ROOT"] = $conf['document.root'].'/'.$conf['project.path']; - define("PROJECT_ROOT", $conf['document.root'].'/'.$conf['project.path']); - define("PROJECT_PATH", $conf['project.path']); + if (!defined('PROJECT_ROOT')) { define("PROJECT_ROOT", $conf['document.root'].'/'.$conf['project.path']); } + if (!defined('PROJECT_PATH')) { define("PROJECT_PATH", $conf['project.path']); } } else { - define("PROJECT_ROOT", $conf['document.root']); - define("PROJECT_PATH", ''); + if (!defined('PROJECT_ROOT')) { define("PROJECT_ROOT", $conf['document.root']); } + if (!defined('PROJECT_PATH')) { define("PROJECT_PATH", ''); } } //set the error reporting