Skip to content

Commit 6190673

Browse files
Checks if the menu item name is a string
Co-authored-by: Weston Ruter <[email protected]>
1 parent 3f98766 commit 6190673

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-includes/script-loader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3487,7 +3487,7 @@ function wp_enqueue_command_palette_assets() {
34873487
if ( $menu ) {
34883488
$menu_commands = array();
34893489
foreach ( $menu as $menu_item ) {
3490-
if ( empty( $menu_item[0] ) || ! empty( $menu_item[1] ) && ! current_user_can( $menu_item[1] ) ) {
3490+
if ( empty( $menu_item[0] ) || ! is_string( $menu_item[0] ) || ! empty( $menu_item[1] ) && ! current_user_can( $menu_item[1] ) ) {
34913491
continue;
34923492
}
34933493

0 commit comments

Comments
 (0)