WordPress.org

Make WordPress Core

Changeset 38004


Ignore:
Timestamp:
07/07/2016 04:38:28 PM (4 years ago)
Author:
ocean90
Message:

Screen API: After [37972], ensure that $box['args'] is an array before trying to access __widget_basename.

This prevents a PHP fatal error on the Nav Menus screen where $args is an object.

Props elrae.
Fixes #35021.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/screen.php

    r37972 r38004  
    121121                $widget_title = $box['title'];
    122122
    123                 if ( isset( $box['args']['__widget_basename'] ) ) {
     123                if ( is_array( $box['args'] ) && isset( $box['args']['__widget_basename'] ) ) {
    124124                    $widget_title = $box['args']['__widget_basename'];
    125125                }
Note: See TracChangeset for help on using the changeset viewer.