[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 01:08:36 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 jerclarke):
Thanks for testing it! FWIW like I said I can't replicate the log message
on my local site, only on the server.
What I can replicate everywhere (custom theme+plugins, no plugins with
twentytwentyfive) is the fact that when I visit `wp-admin/load-styles.php`
the `$path` is empty and so is the `$font_family`, which explains why the
error is thrown on the live server/
I tried both empty `wp-admin/load-styles.php` and your more realistic one
with all the URL variables, same result in terms of the `null` variables
(though of course the long version renders actual styles unlike the plain
version).
Also confirmed with 6.9.1.
Very strange. There's no way to view logs in playgrounds, is there? It's
hard to have more platforms where I can test this with a debugger, maybe
it's something in common between my local mac running Valet and our Ubuntu
server, but it's kind of hard to imagine.
I guess if you want to close this you can. I thought it would be easy to
reproduce on other systems because it's so reliable across the ones I'm
using.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64087#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list