From 48e83418ed6c9193cb4007a05f81c2a75e8bcbdf Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Wed, 26 Aug 2015 03:26:21 +0000 Subject: [PATCH] When `wp_json_encode()` calls `json_encode()`, the latter will generate warnings if the string contains non-UTF-8 characters. No-one likes warnings, so we need to do something about that. The good news is, the point of `wp_json_encode()` is to handle those non-UTF-8 characters. It'll totally just fix them up, no problem. Anyway, we can just ignore those warnings. Fixes #33524. Built from https://develop.svn.wordpress.org/trunk@33747 git-svn-id: http://core.svn.wordpress.org/trunk@33715 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index fd722195f9..006cb6cb7e 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -2677,7 +2677,7 @@ function wp_json_encode( $data, $options = 0, $depth = 512 ) { $args = array( $data ); } - $json = call_user_func_array( 'json_encode', $args ); + $json = @call_user_func_array( 'json_encode', $args ); // If json_encode() was successful, no need to do more sanity checking. // ... unless we're in an old version of PHP, and json_encode() returned diff --git a/wp-includes/version.php b/wp-includes/version.php index 89ec4d32ab..99ffa43978 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-33746'; +$wp_version = '4.4-alpha-33747'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.