Skip to content

Commit

Permalink
hotfix current_category may be null
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndr-w committed Mar 23, 2022
1 parent 2532187 commit 503e800
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/speed_up.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function __construct($profile = 'auto') {
};
}

if($category_current->getId() != $start_id) {
if($category_current && $category_current->getId() != $start_id) {
// Startseite hinzufügen
$urls[$start_id] = rex_article::get($start_id)->getUrl();
}
Expand All @@ -88,7 +88,7 @@ function __construct($profile = 'auto') {
$urls[$category->getId()] = $category->getUrl();
}

if($category_current->getId() != $start_id) {
if($category_current && $category_current->getId() != $start_id) {
// Startseite hinzufügen
$urls[$start_id] = rex_article::get($start_id)->getUrl();
}
Expand Down

0 comments on commit 503e800

Please sign in to comment.