Skip to content

Commit 50d82a5

Browse files
committed
Toolbar: Prevent PHP deprecation warning in admin bar when node is added with a null parent.
Developed in WordPress/wordpress-develop#11055 Props sky_76, westonruter, ozgursar, sabernhardt. Fixes #64728. Built from https://develop.svn.wordpress.org/trunk@61997 git-svn-id: http://core.svn.wordpress.org/trunk@61279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent 3e03a8e commit 50d82a5

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

wp-includes/class-wp-admin-bar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public function add_node( $args ) {
169169
'my-blogs' => array( 'my-sites', '3.3' ),
170170
);
171171

172-
if ( isset( $back_compat_parents[ $args['parent'] ] ) ) {
172+
if ( is_string( $args['parent'] ) && isset( $back_compat_parents[ $args['parent'] ] ) ) {
173173
list( $new_parent, $version ) = $back_compat_parents[ $args['parent'] ];
174174
_deprecated_argument( __METHOD__, $version, sprintf( 'Use <code>%s</code> as the parent for the <code>%s</code> admin bar node instead of <code>%s</code>.', $new_parent, $args['id'], $args['parent'] ) );
175175
$args['parent'] = $new_parent;

wp-includes/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* @global string $wp_version
1818
*/
19-
$wp_version = '7.0-beta5-61996';
19+
$wp_version = '7.0-beta5-61997';
2020

2121
/**
2222
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

0 commit comments

Comments
 (0)