Return an empty object properly. see #17242.
git-svn-id: https://develop.svn.wordpress.org/trunk@19821 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ef81adda7b
commit
b3aee653fd
@ -1490,7 +1490,7 @@ function _get_random_header_data() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( empty( $headers ) )
|
if ( empty( $headers ) )
|
||||||
return stdClass();
|
return new stdClass;
|
||||||
|
|
||||||
$_wp_random_header = (object) $headers[ array_rand( $headers ) ];
|
$_wp_random_header = (object) $headers[ array_rand( $headers ) ];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user