Coding Standards: Remove extra check in WP_REST_Server::get_json_last_error().
`json_last_error()` can only return an integer, and the `JSON_ERROR_NONE` constant has the value of `0`, so the `empty()` check is redundant here. Follow-up to [34928], [46206]. Props dilipbheda, audrasjb, SergeyBiryukov. See #63249. Built from https://develop.svn.wordpress.org/trunk@60151 git-svn-id: http://core.svn.wordpress.org/trunk@59487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1339,9 +1339,7 @@ class WP_REST_Server {
|
||||
* @return false|string Boolean false or string error message.
|
||||
*/
|
||||
protected function get_json_last_error() {
|
||||
$last_error_code = json_last_error();
|
||||
|
||||
if ( JSON_ERROR_NONE === $last_error_code || empty( $last_error_code ) ) {
|
||||
if ( JSON_ERROR_NONE === json_last_error() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.9-alpha-60150';
|
||||
$wp_version = '6.9-alpha-60151';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
||||
Reference in New Issue
Block a user