Skip to content

Commit

Permalink
Fix class-wpcom-admin-bar.php fatal error (#38526)
Browse files Browse the repository at this point in the history
* If  is object cast as array

* changelog

* Bail if not an array
  • Loading branch information
DustyReagan authored Jul 25, 2024
1 parent 5fc4449 commit 991bb5f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Fix fatal error in admin bar
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class WPCOM_Admin_Bar extends \WP_Admin_Bar {
* }
*/
public function add_node( $args ) {
if ( empty( $args['href'] ) ) {
if ( ! is_array( $args ) || empty( $args['href'] ) ) {
parent::add_node( $args );
return;
}
Expand Down

0 comments on commit 991bb5f

Please sign in to comment.