[wp-trac] [WordPress Trac] #47854: When using CLI, warning printed because SERVER_NAME not defined

WordPress Trac noreply at wordpress.org
Thu Aug 8 20:19:57 UTC 2019


#47854: When using CLI, warning printed because SERVER_NAME not defined
---------------------------+-----------------------------
 Reporter:  paulschreiber  |       Owner:  SergeyBiryukov
     Type:  defect (bug)   |      Status:  closed
 Priority:  normal         |   Milestone:  5.3
Component:  REST API       |     Version:  5.2.2
 Severity:  normal         |  Resolution:  fixed
 Keywords:  has-patch      |     Focuses:
---------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"45771" 45771]:
 {{{
 #!CommitTicketReference repository="" revision="45771"
 REST API: In `get_rest_url()`, check if `$_SERVER['SERVER_NAME']` is set
 to avoid a PHP warning in CLI context.

 Props paulschreiber.
 Fixes #47854.
 }}}

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


More information about the wp-trac mailing list