Skip to content

Commit

Permalink
Notice vermeiden (#452)
Browse files Browse the repository at this point in the history
  • Loading branch information
gharlan authored Dec 7, 2021
1 parent b81a724 commit 07c1b55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/yrewrite/path_resolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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;

Expand Down

0 comments on commit 07c1b55

Please sign in to comment.