Used By
Used By | Description |
---|---|
wp-includes/rest-api/class-wp-rest-server.php: WP_REST_Server::serve_request() | Handles serving an API request. |
Returns if an error occurred during most recent JSON encode/decode.
Strings to be translated will be in format like "Encoding error: Maximum stack depth exceeded".
(bool|string) Boolean false or string error message.
File: wp-includes/rest-api/class-wp-rest-server.php
protected function get_json_last_error() { $last_error_code = json_last_error(); if ( JSON_ERROR_NONE === $last_error_code || empty( $last_error_code ) ) { return false; } return json_last_error_msg(); }
Version | Description |
---|---|
4.4.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rest_server/get_json_last_error