Skip to content

Commit

Permalink
Fix php static analysis problem with using empty() on the $site_403 a…
Browse files Browse the repository at this point in the history
…nd $site_404 variables.
  • Loading branch information
finnlewis committed Feb 5, 2025
1 parent 948ac7b commit 5afeb30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions localgov_base.theme
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,13 @@ function localgov_base_preprocess_page(&$variables): void {
$node_id = $node->id();
$is_404_page_node = $site_404 === 'node/' . $node_id;
$is_403_page_node = $site_403 === 'node/' . $node_id;
if ($is_404_page_node && empty($site_404)) {
if ($is_404_page_node && is_null($site_404)) {
$variables['default_status_content'] = TRUE;
}
else {
$variables['default_status_content'] = FALSE;
}
if ($is_403_page_node && empty($site_403)) {
if ($is_403_page_node && is_null($site_403)) {
$variables['default_status_content'] = TRUE;
}
else {
Expand Down

0 comments on commit 5afeb30

Please sign in to comment.