Embeds: Correct error handling in _oembed_rest_pre_serve_request().

Since the function is supposed to output a string and only return a boolean value, this commit ensures that an error message is properly displayed, bringing consistency with a similar fragment a few lines above.

Follow-up to [35436].

Props abcd95, oglekler, SergeyBiryukov.
Fixes #63652.
Built from https://develop.svn.wordpress.org/trunk@60443


git-svn-id: http://core.svn.wordpress.org/trunk@59779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2025-07-09 18:35:31 +00:00
parent 6eb679999f
commit 5f30426e51
2 changed files with 2 additions and 2 deletions

View File

@@ -791,7 +791,7 @@ function _oembed_rest_pre_serve_request( $served, $result, $request, $server ) {
// Bail if there's no XML.
if ( ! $result ) {
status_header( 501 );
return get_status_header_desc( 501 );
die( get_status_header_desc( 501 ) );
}
if ( ! headers_sent() ) {

View File

@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.9-alpha-60440';
$wp_version = '6.9-alpha-60443';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.