[wp-trac] [WordPress Trac] #62950: PHP deprecation warning in /wp-admin/includes/class-automatic-upgrader-skin.php
WordPress Trac
noreply at wordpress.org
Wed Feb 12 15:18:13 UTC 2025
#62950: PHP deprecation warning in /wp-admin/includes/class-automatic-upgrader-
skin.php
-----------------------------+------------------------------
Reporter: nexbridge | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version: 6.7.2
Severity: normal | Resolution:
Keywords: | Focuses:
-----------------------------+------------------------------
Comment (by nexbridge):
Thanks @sainathpoojary, but in PHP if a variable is not initialised then
it would throw a different warning - the issue here seems to be that the
variable is being set to NULL in some cases and this is then causing the
deprecation warning when it's passed into str_contains() or trim(). The
variable is being set on lines 76, 80 and 84, however judging by the code
I doubt that lines 76 or 84 would return a NULL value, so it may be as
simple as just adding a null coalescing operator on line 80:
{{{#!php
<?php
$string = $feedback ?? '';
}}}
To that end I've added some debug lines to test my theory the next time it
happens!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62950#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list