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. git-svn-id: https://develop.svn.wordpress.org/trunk@38004 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
65a90ba496
commit
535f0e3090
@ -120,7 +120,7 @@ function meta_box_prefs( $screen ) {
|
||||
|
||||
$widget_title = $box['title'];
|
||||
|
||||
if ( isset( $box['args']['__widget_basename'] ) ) {
|
||||
if ( is_array( $box['args'] ) && isset( $box['args']['__widget_basename'] ) ) {
|
||||
$widget_title = $box['args']['__widget_basename'];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user