Make WordPress Core


Ignore:
Timestamp:
08/26/2015 03:25:15 AM (9 years ago)
Author:
pento
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r33734 r33747  
    26782678    }
    26792679
    2680     $json = call_user_func_array( 'json_encode', $args );
     2680    $json = @call_user_func_array( 'json_encode', $args );
    26812681
    26822682    // If json_encode() was successful, no need to do more sanity checking.
Note: See TracChangeset for help on using the changeset viewer.