From bd49bb180e2e313fd57ba43292c1f30f3a41c61e Mon Sep 17 00:00:00 2001 From: Ryan McCue Date: Tue, 17 May 2016 03:54:37 +0000 Subject: [PATCH] REST API: Use prepared JSON data correctly. This was modifying a variable that was never used. Oops. Fixes #36358. Props jrf. git-svn-id: https://develop.svn.wordpress.org/trunk@37444 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 50bd8109b6..7710ab3343 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -2872,7 +2872,7 @@ function wp_json_encode( $data, $options = 0, $depth = 512 ) { } // Prepare the data for JSON serialization. - $data = _wp_json_prepare_data( $data ); + $args[0] = _wp_json_prepare_data( $data ); $json = @call_user_func_array( 'json_encode', $args );