Skip to content

Commit

Permalink
[3.10] [PHP 8.1] Fixes mod_menu/menu.php type null instead of string
Browse files Browse the repository at this point in the history
Fixes Deprecated: trim(): `Passing null to parameter #1 ($string) of type string is deprecated in administrator/modules/mod_menu/menu.php on line 383`
  • Loading branch information
beat authored Jan 21, 2022
1 parent b2206b0 commit d53fc78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion administrator/modules/mod_menu/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ protected function preprocess($items)
}

// Exclude if link is invalid
if (!in_array($item->type, array('separator', 'heading', 'container')) && trim($item->link) === '')
if (!in_array($item->type, array('separator', 'heading', 'container')) && trim((string) $item->link) === '')
{
continue;
}
Expand Down

0 comments on commit d53fc78

Please sign in to comment.