[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
Thu Feb 26 19:50:03 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):
Replying to [comment:10 jerclarke]:
> I didn't dig into WHY that filter returns null, but now that I know that
errors are **expected** during `load-styles.php`, I'm disinclined to spend
more time on it.
I think it's because `load-scripts.php` and `load-styles.php` load
`noop.php` in which `apply_filters` is [https://github.com/WordPress
/wordpress-develop/blob/f041be2a79eb9694217d716da3bf6d53f63a2173/src/wp-
admin/includes/noop.php#L37-L40 defined] as:
{{{#!php
<?php
function apply_filters() {}
}}}
So that explains why `null` is returned when applying the filters 😬
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64087#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list