paramètre null passé

This commit is contained in:
Fred Tempez 2022-10-04 10:18:45 +02:00
parent 02ae9a1820
commit 7ce77b98f0
1 changed files with 9 additions and 6 deletions

View File

@ -2946,14 +2946,17 @@ class core extends common
// Check l'existence de l'action // Check l'existence de l'action
$action = ''; $action = '';
$ignore = true; $ignore = true;
foreach (explode('-', $this->getUrl(1)) as $actionPart) { if (!is_null($this->getUrl(1))) {
if ($ignore) { foreach(explode('-', $this->getUrl(1)) as $actionPart) {
if($ignore) {
$action .= $actionPart; $action .= $actionPart;
$ignore = false; $ignore = false;
} else { }
else {
$action .= ucfirst($actionPart); $action .= ucfirst($actionPart);
} }
} }
}
$action = array_key_exists($action, $module::$actions) ? $action : 'index'; $action = array_key_exists($action, $module::$actions) ? $action : 'index';
if (array_key_exists($action, $module::$actions)) { if (array_key_exists($action, $module::$actions)) {
$module->$action(); $module->$action();