Make WordPress Core


Ignore:
Timestamp:
03/01/2013 03:51:16 PM (12 years ago)
Author:
SergeyBiryukov
Message:

Ensure that get_nav_menu_locations() always returns an array. props JustinSainton for initial patch. fixes #23508.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/nav-menu.php

    r23416 r23550  
    128128
    129129function get_nav_menu_locations() {
    130     return get_theme_mod( 'nav_menu_locations' );
     130    $locations = get_theme_mod( 'nav_menu_locations' );
     131    return ( is_array( $locations ) ) ? $locations : array();
    131132}
    132133
Note: See TracChangeset for help on using the changeset viewer.