[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:35:59 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                                          |
-------------------------------------------------+-------------------------

Comment (by cocasio45):

 Replying to [comment:8 jrf]:
 > 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.


 I'm ok with that point of view, in this case we need to make the exception
 more visible because the only way that I could get the error is when I run
 xdebug

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


More information about the wp-trac mailing list