[wp-trac] [WordPress Trac] #63249: Minor code and inline docs improvements in class-wp-rest-server.php

WordPress Trac noreply at wordpress.org
Fri Apr 11 19:36:26 UTC 2025


#63249: Minor code and inline docs improvements in class-wp-rest-server.php
--------------------------+------------------------
 Reporter:  dilipbheda    |       Owner:  audrasjb
     Type:  defect (bug)  |      Status:  reviewing
 Priority:  normal        |   Milestone:  6.9
Component:  REST API      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  docs
--------------------------+------------------------

Comment (by SergeyBiryukov):

 In [changeset:"60151" 60151]:
 {{{
 #!CommitTicketReference repository="" revision="60151"
 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.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63249#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list