[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 Feb 25 00:47:25 UTC 2026


#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:  7.0
Component:  Script       |     Version:
  Loader                 |
 Severity:  minor        |  Resolution:
 Keywords:  php8         |     Focuses:  administration, performance, php-
  reporter-feedback      |  compatibility
-------------------------+-------------------------------------------------

Comment (by westonruter):

 I'm testing with PHP 8.3 and Nginx with the Twenty Twenty-Five theme
 active.

 I attempt to access `/wp-admin/load-
 styles.php?c=0&dir=ltr&load%5Bchunk_0%5D=dashicons,admin-bar,buttons
 ,media-views,common,forms,admin-menu,dashboard,list-
 tables,edit,revisions,media,themes,about,nav-menu&load%5Bchunk_1%5D=s,wp-
 pointer,widgets,site-icon,l10n,wp-auth-check,wp-color-picker&ver=6.8.3`

 Unfortunately, I'm not seeing anything in the logs. I'm even testing in WP
 6.8.3.

 For reference:

 * The logged `urlencode()` error is coming from this line:
 https://github.com/WordPress/wordpress-develop/blob/6.8.3/src/wp-includes
 /script-loader.php#L1680
 * The logged `file_exists()` error is coming from this line:
 https://github.com/WordPress/wordpress-develop/blob/6.8.3/src/wp-includes
 /global-styles-and-settings.php#L429

 For the first, when I try logging out `$font_family` I see `"Noto
 Serif:400,400i,700,700i"`.
 For the second, when I try logging out `$path` I see: `"wp-
 content/themes/twentytwentyfive/theme.json"`.

 This is when I access `load-styles.php`. So it is not triggering the same
 issues as you.

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


More information about the wp-trac mailing list