Skip to content

Commit 4d43703

Browse files
committed
Command Palette: Ensure $menu_label is initialized before using it.
Unprops davidbaumwald. Follow-up to [61126]. Props cbravobernal. See #64196. git-svn-id: https://develop.svn.wordpress.org/trunk@61127 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 0f3e145 commit 4d43703

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/wp-includes/script-loader.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3442,7 +3442,8 @@ function wp_enqueue_command_palette_assets() {
34423442
}
34433443

34443444
// Remove all HTML tags and their contents.
3445-
$processor = new WP_HTML_Tag_Processor( $menu_item[0] );
3445+
$processor = new WP_HTML_Tag_Processor( $menu_item[0] );
3446+
$menu_label = '';
34463447
while ( $processor->next_token() ) {
34473448
if ( '#text' === $processor->get_token_name() ) {
34483449
$menu_label .= $processor->get_modifiable_text();

0 commit comments

Comments
 (0)