[wp-trac] [WordPress Trac] #62950: PHP deprecation warning in /wp-admin/includes/class-automatic-upgrader-skin.php

WordPress Trac noreply at wordpress.org
Sat May 2 12:57:01 UTC 2026


#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 ankitv):

 The root cause is in the else branch — when $feedback is null, it gets
 assigned directly to $string, which then gets passed to str_contains()
 and trim(), both triggering PHP 8.2 deprecation warnings.

 Fix: cast $feedback to string in the else branch:

     $string = (string) $feedback;

 This coerces null to '' at the point of assignment, consistent with the
 @param string|array|WP_Error $feedback docblock.

 https://github.com/Anny0007/AV-wordpress-develop/pull/1/

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


More information about the wp-trac mailing list