Skin talk:Citizen

Latest comment: 1 month ago by WikiForMen in topic Bugfix for Version 2.40.2

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 ) {
			[...]
		}
	}

WikiForMen (talk) 23:30, 6 January 2025 (UTC)Reply

Return to "Citizen" page.