diff --git a/lib/yrewrite/path_resolver.php b/lib/yrewrite/path_resolver.php index a67e8841..19c85a33 100644 --- a/lib/yrewrite/path_resolver.php +++ b/lib/yrewrite/path_resolver.php @@ -234,7 +234,7 @@ private function searchPath(rex_yrewrite_domain $domain, string $url): ?array { $clangIds = rex_clang::getAllIds(); - foreach ($this->paths[$domain->getName()] as $articleId => $clangPaths) { + foreach ($this->paths[$domain->getName()] ?? [] as $articleId => $clangPaths) { foreach ($clangIds as $clangId) { if (isset($clangPaths[$clangId]) && $clangPaths[$clangId] == $url) { return ['article_id' => $articleId, 'clang_id' => $clangId]; @@ -249,7 +249,7 @@ private function resolveRedirectionPath(rex_yrewrite_domain $domain, string $url { $clangIds = rex_clang::getAllIds(); - foreach ($this->redirections[$domain->getName()] as $clangRedirections) { + foreach ($this->redirections[$domain->getName()] ?? [] as $clangRedirections) { foreach ($clangIds as $clangId) { $redirection = $clangRedirections[$clangId] ?? null;