Skin talk:Citizen
Latest comment: 1 month ago by WikiForMen in topic Bugfix for Version 2.40.2
![]() Archives
|
---|
Bugfix for Version 2.40.2
edit"version": "2.40.2"; "MediaWiki": ">= 1.39.4"; "File": includes/Hooks/SkinHooks.php; "Line": 464
private static function addIconsToMenuItems( &$links, $menu ) {
// Loop through each menu to check/append its link classes.
foreach ( $links[$menu] as $key => $item ) {
[...]
}
}
Add a line, because $links[$menu]
can be Boolean
:
private static function addIconsToMenuItems( &$links, $menu ) {
if ( is_bool( $links[$menu] ) ) return; // <==== Add this line! <====
// Loop through each menu to check/append its link classes.
foreach ( $links[$menu] as $key => $item ) {
[...]
}
}