[wp-trac] [WordPress Trac] #59832: Deprecation warnings for resulting from a call to plugin_dir_url
WordPress Trac
noreply at wordpress.org
Fri Feb 9 16:47:28 UTC 2024
#59832: Deprecation warnings for resulting from a call to plugin_dir_url
----------------------------+-----------------------
Reporter: geistesblitzer | Owner: (none)
Type: defect (bug) | Status: reopened
Priority: normal | Milestone:
Component: Plugins | Version: 6.4.2
Severity: normal | Resolution:
Keywords: | Focuses:
----------------------------+-----------------------
Comment (by charlestonsw):
plugins_url() allows the first param to be optionally set to '' (the
default) which throws this warning for PHP 8.2.3 (probably any PHP 8
version).
Plugin or theme developers SHOULD be developing with WP_DEBUG on, which
then throws this error fairly early in most instances. In my case trigger
a stack of "headers already sent" messages.
IMO WordPress Core function defaults should not lead to PHP warnings for
supported/recommended versions of PHP. At the very least the
plugins_url() should be added to the exceptions list here for PHP 8.0/8.1
etc.:
https://make.wordpress.org/core/handbook/references/php-compatibility-and-
wordpress-versions/
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59832#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list