diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 0fb2117835..9f229291a7 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -2662,7 +2662,9 @@ function wp_json_encode( $data, $options = 0, $depth = 512 ) { $json = call_user_func_array( 'json_encode', $args ); // If json_encode() was successful, no need to do more sanity checking. - if ( false !== $json ) { + // ... unless we're in an old version of PHP, and json_encode() returned + // a string containing 'null'. Then we need to do more sanity checking. + if ( false !== $json && ( version_compare( PHP_VERSION, '5.5', '>=' ) || false === strpos( $json, 'null' ) ) ) { return $json; } diff --git a/wp-includes/version.php b/wp-includes/version.php index eedce7f17b..d178f218cd 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.1-beta2-30560'; +$wp_version = '4.1-beta2-30561'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.