Skip to content

Commit 9082d4b

Browse files
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. git-svn-id: https://develop.svn.wordpress.org/trunk@60443 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 6bc94ef commit 9082d4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-includes/embed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ function _oembed_rest_pre_serve_request( $served, $result, $request, $server ) {
791791
// Bail if there's no XML.
792792
if ( ! $result ) {
793793
status_header( 501 );
794-
return get_status_header_desc( 501 );
794+
die( get_status_header_desc( 501 ) );
795795
}
796796

797797
if ( ! headers_sent() ) {

0 commit comments

Comments
 (0)