Evite un warning

This commit is contained in:
Fred Tempez 2025-02-03 14:39:17 +01:00
parent 1747e60082
commit 962e4c5d7c

View File

@ -492,7 +492,10 @@ class core extends common
*/
$accessInfo['userName'] = '';
$accessInfo['pageId'] = '';
if ($this->getData(['user'])) {
if (
is_array($this->getData(['user']))
&& empty($this->getData(['user'])) === false
) {
foreach ($this->getData(['user']) as $userId => $userIds) {
if (!is_null($this->getData(['user', $userId, 'accessUrl']))) {
$t = explode('/', $this->getData(['user', $userId, 'accessUrl']));
@ -573,7 +576,6 @@ class core extends common
'inlineStyle' => $inlineStyle,
'inlineScript' => $inlineScript,
]);
}
// Importe le module
else {
@ -802,8 +804,7 @@ class core extends common
http_response_code(404);
// Pour éviter une 404, bascule dans l'espace correct si la page existe dans cette langue.
// Parcourir les espaces
foreach (common::$languages as $langId => $value) {
;
foreach (common::$languages as $langId => $value) {;
if (
// l'espace existe
is_dir(common::DATA_DIR . $langId) &&