[wp-trac] [WordPress Trac] #62159: Creation of dynamic property ftp::$features is deprecated (PHP 8.2)

WordPress Trac noreply at wordpress.org
Fri Oct 4 14:48:49 UTC 2024


#62159: Creation of dynamic property ftp::$features is deprecated (PHP 8.2)
----------------------------+--------------------------------
 Reporter:  kmurphyzuora    |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Administration  |     Version:
 Severity:  major           |  Resolution:
 Keywords:  dev-feedback    |     Focuses:  php-compatibility
----------------------------+--------------------------------
Changes (by craiggomes):

 * keywords:   => dev-feedback
 * focuses:   => php-compatibility
 * severity:  normal => major


Comment:

 In /var/www/html/wp-admin/includes/class-ftp.php, add a declaration for
 the features property within the FTP class.

 {{{#!php
 <?php
 class ftp {

     // Declare the 'features' property to avoid dynamic property creation
     public $features = array();

     // Rest of the class code

 }
 }}}



 I feel this should fix it.

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


More information about the wp-trac mailing list