[wp-trac] [WordPress Trac] #64087: Deprecated urlencode() passing null warning during load-styles.php because get_stylesheet_directory() returns empty

WordPress Trac noreply at wordpress.org
Wed Oct 8 19:40:49 UTC 2025


#64087: Deprecated urlencode() passing null warning during load-styles.php because
get_stylesheet_directory() returns empty
-------------------------+-------------------------------------------------
 Reporter:  jerclarke    |       Owner:  (none)
     Type:  defect       |      Status:  new
  (bug)                  |
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Script       |     Version:  6.8.3
  Loader                 |
 Severity:  minor        |  Resolution:
 Keywords:  2nd-opinion  |     Focuses:  administration, performance, php-
                         |  compatibility
-------------------------+-------------------------------------------------

Comment (by jerclarke):

 For now my temporary fix will be to use the following in `wp-config.php`:

 {{{
 define( 'CONCATENATE_SCRIPTS', false );
 }}}

 This silences both of the errors above because it disables the entire
 `load-scripts.php` system and thus these two bugs don't surface.

 Obviously this isn't a good solution, because I miss out on the intended
 performance benefits of concatenating and minifying the scripts. At the
 same time, I tested the load speed in dev tools and the difference was
 minimal in 2025 Chrome, more or less irrelevant in the random differences
 between loads. As I read [https://discourse.roots.io/t/upstream-timed-out-
 for-load-styles-php/26973 elsewhere where people are struggling with this
 issue], the whole premise of concatenating scripts is a lot less relevant
 now than it was a decade ago when systems like this were added.

 Really hoping this is something that can be fixed in core, of course.
 Clean logs are priceless for finding actual bugs, after all.

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


More information about the wp-trac mailing list