[wp-trac] [WordPress Trac] #54900: PHP warning in `WP_REST_Global_Styles_Controller` if no `styles` exist in theme.json

WordPress Trac noreply at wordpress.org
Thu Feb 17 13:46:41 UTC 2022


#54900: PHP warning in `WP_REST_Global_Styles_Controller` if no `styles` exist in
theme.json
-------------------------------------+-------------------------------
 Reporter:  ntsekouras               |       Owner:  jorgefilipecosta
     Type:  defect (bug)             |      Status:  closed
 Priority:  normal                   |   Milestone:  5.9.1
Component:  Editor                   |     Version:
 Severity:  minor                    |  Resolution:  fixed
 Keywords:  has-patch needs-refresh  |     Focuses:
-------------------------------------+-------------------------------
Changes (by jorgefilipecosta):

 * owner:  (none) => jorgefilipecosta
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"52750" 52750]:
 {{{
 #!CommitTicketReference repository="" revision="52750"
 Global Styles: Fix PHP warning in WP_REST_Global_Styles_Controller if no
 styles exist.

 There is a PHP warning in WP_REST_Global_Styles_Controller because we are
 assuming that every theme.json has styles property, which is not always
 the case.

 Props ntsekouras.
 Fixes #54900.
 }}}

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


More information about the wp-trac mailing list