From 7ce77b98f07d442f450ee8e8da5cd4b8e2ede1ec Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Tue, 4 Oct 2022 10:18:45 +0200 Subject: [PATCH] =?UTF-8?q?param=C3=A8tre=20null=20pass=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/core/core.php b/core/core.php index 87f5639f..3df0982f 100644 --- a/core/core.php +++ b/core/core.php @@ -2946,12 +2946,15 @@ class core extends common // Check l'existence de l'action $action = ''; $ignore = true; - foreach (explode('-', $this->getUrl(1)) as $actionPart) { - if ($ignore) { - $action .= $actionPart; - $ignore = false; - } else { - $action .= ucfirst($actionPart); + if (!is_null($this->getUrl(1))) { + foreach(explode('-', $this->getUrl(1)) as $actionPart) { + if($ignore) { + $action .= $actionPart; + $ignore = false; + } + else { + $action .= ucfirst($actionPart); + } } } $action = array_key_exists($action, $module::$actions) ? $action : 'index';