[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:54:42 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):

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


Comment:

 In [changeset:"52751" 52751]:
 {{{
 #!CommitTicketReference repository="" revision="52751"
 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.
 Merges [52750] to the 5.9 branch.
 Fixes #54900.
 }}}

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


More information about the wp-trac mailing list