[wp-trac] [WordPress Trac] #59507: global-styles-and-settings.php in wp_theme_has_theme_json

WordPress Trac noreply at wordpress.org
Mon Oct 2 16:34:16 UTC 2023


#59507: global-styles-and-settings.php in wp_theme_has_theme_json
-------------------------------------------------+-------------------------
 Reporter:  cocasio45                            |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Themes                               |     Version:  6.3.1
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch php81 needs-unit-tests     |     Focuses:
  close                                          |
-------------------------------------------------+-------------------------
Changes (by jrf):

 * keywords:  has-patch php81 needs-unit-tests => has-patch php81 needs-
     unit-tests close


Comment:

 Replying to [comment:7 cocasio45]:
 > @spacedmonkey it's written in the code i forget to write it in the
 ticket but file_exists, when recieving the null value throw a DEPRECATION
 ERROR that's why


 To be honest, the only time that could happen is if a plugin/theme would
 hook into that filter and return a value of `null`, which is not a valid
 return type for
 [https://developer.wordpress.org/reference/hooks/theme_file_path/ the
 filter] (it expects type `string` and only `string`).

 In my opinion, this deprecation should not be hidden away. The
 plugin/theme ''doing it wrong'' should get fixed instead.

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


More information about the wp-trac mailing list