diff --git a/src/wp-admin/includes/class-wp-plugins-list-table.php b/src/wp-admin/includes/class-wp-plugins-list-table.php index 08b2e982e702f..7f63a99dd30d7 100644 --- a/src/wp-admin/includes/class-wp-plugins-list-table.php +++ b/src/wp-admin/includes/class-wp-plugins-list-table.php @@ -1365,7 +1365,7 @@ public function single_row( $item ) { if ( $paused ) { $notice_text = __( 'This plugin failed to load properly and is paused during recovery mode.' ); - printf( '
%s
', $notice_text ); + printf( '%s
', $notice_text ); $error = wp_get_plugin_error( $plugin_file ); diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index dca95d69b69fe..1963cc880210e 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -970,7 +970,7 @@ function do_enclose( $content, $post ) { } if ( in_array( substr( $type, 0, strpos( $type, '/' ) ), $allowed_types, true ) ) { - add_post_meta( $post->ID, 'enclosure', "$url\n$len\n$mime\n" ); + add_post_meta( $post->ID, 'enclosure', "$url\n$len\n$type\n" ); } } } diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index 29c30137e173d..76fd8ada83b69 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -1878,6 +1878,8 @@ function single_month_title( $prefix = '', $display = true ) { $m = get_query_var( 'm' ); $year = get_query_var( 'year' ); $monthnum = get_query_var( 'monthnum' ); + $my_year = ''; + $my_month = ''; if ( ! empty( $monthnum ) && ! empty( $year ) ) { $my_year = $year; @@ -5421,6 +5423,7 @@ function get_the_generator( $type = '' ) { break; } } + $gen = ''; switch ( $type ) { case 'html': diff --git a/src/wp-includes/html-api/class-wp-html-processor.php b/src/wp-includes/html-api/class-wp-html-processor.php index b2a597b938495..7de136e5cd696 100644 --- a/src/wp-includes/html-api/class-wp-html-processor.php +++ b/src/wp-includes/html-api/class-wp-html-processor.php @@ -3394,6 +3394,7 @@ private function in_body_any_other_end_tag(): bool { * of boundary in the stack. For example, a `` should not * close anything beyond its containing `P` or `DIV` element. */ + $node = null; foreach ( $this->state->stack_of_open_elements->walk_up() as $node ) { if ( 'html' === $node->namespace && $token_name === $node->node_name ) { break; diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 3813176140bb4..34553c98f502e 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -7489,6 +7489,7 @@ function wp_mime_type_icon( $mime = 0, $preferred_ext = '.png' ) { $matches = wp_match_mime_types( array_keys( $types ), $post_mimes ); $matches['default'] = array( 'default' ); + $icon = false; foreach ( $matches as $match => $wilds ) { foreach ( $wilds as $wild ) { if ( ! isset( $types[ $wild ] ) ) { diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php index d682762acb7e7..19a3ce2fcf4db 100644 --- a/src/wp-includes/user.php +++ b/src/wp-includes/user.php @@ -4275,6 +4275,7 @@ function _wp_privacy_send_request_confirmation_notification( $request_id ) { return; } + $manage_url = ''; if ( 'export_personal_data' === $request->action_name ) { $manage_url = admin_url( 'export-personal-data.php' ); } elseif ( 'remove_personal_data' === $request->action_name ) { diff --git a/tests/phpunit/tests/functions/doEnclose.php b/tests/phpunit/tests/functions/doEnclose.php index 6d36fd373a779..a0a4ca7c48589 100644 --- a/tests/phpunit/tests/functions/doEnclose.php +++ b/tests/phpunit/tests/functions/doEnclose.php @@ -125,6 +125,10 @@ public function data_do_enclose() { 'content' => 'https://example.com?test=1', 'expected' => '', ), + 'header-type-no-extension' => array( + 'content' => 'https://example.com/media/stream-mp4', + 'expected' => "https://example.com/media/stream-mp4\n123\nvideo/mp4\n", + ), ); } @@ -276,6 +280,9 @@ public function mock_http_request( $response, $parsed_args, $url ) { $path = parse_url( $url, PHP_URL_PATH ); if ( is_string( $path ) ) { + if ( str_contains( $path, 'stream-mp4' ) ) { + return $fake_headers['mp4']; + } $extension = pathinfo( $path, PATHINFO_EXTENSION ); if ( isset( $fake_headers[ $extension ] ) ) { return $fake_headers[ $extension ];