From 91b0fd8c15cdf1b5e9704c8720a40f959e7eb4fe Mon Sep 17 00:00:00 2001 From: "o.pinke" Date: Sun, 3 Apr 2022 15:18:21 +0200 Subject: [PATCH] fixed warning and deprecated errors --- classes/class.modrewriteurlstack.php | 6 +++--- includes/functions.mod_rewrite.php | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/classes/class.modrewriteurlstack.php b/classes/class.modrewriteurlstack.php index 014f583..bed50e2 100644 --- a/classes/class.modrewriteurlstack.php +++ b/classes/class.modrewriteurlstack.php @@ -149,8 +149,8 @@ class ModRewriteUrlStack { $this->_chunkSetPrettyUrlParts($sStackId); } $aPretty = array( - 'urlpath' => $this->_aStack[$sStackId]['urlpath'], - 'urlname' => $this->_aStack[$sStackId]['urlname'] + 'urlpath' => (empty($this->_aStack[$sStackId]['urlpath']))?'':$this->_aStack[$sStackId]['urlpath'], + 'urlname' => (empty($this->_aStack[$sStackId]['urlname']))?'':$this->_aStack[$sStackId]['urlname'] ); return $aPretty; } @@ -168,7 +168,7 @@ class ModRewriteUrlStack { $aUrl['query'] = str_replace('&', '&', $aUrl['query']); parse_str($aUrl['query'], $aUrl['params']); } - if (!isset($aUrl['params']) && !is_array($aUrl['params'])) { + if (empty($aUrl['params']) || !is_array($aUrl['params'])) { $aUrl['params'] = array(); } return $aUrl; diff --git a/includes/functions.mod_rewrite.php b/includes/functions.mod_rewrite.php index e007994..a787210 100644 --- a/includes/functions.mod_rewrite.php +++ b/includes/functions.mod_rewrite.php @@ -615,8 +615,7 @@ function mr_loadConfiguration($clientId, $forceReload = false) { } function mr_getConfigurationFilePath($clientId) { - $clientConfig = cRegistry::getClientConfig((int) $clientId); - $fePath = $clientConfig['path']['frontend']; + $fePath = cRegistry::getFrontendPath(); return $fePath . 'data/config/' . CL_ENVIRONMENT . '/config.mod_rewrite.php'; }