[wp-trac] [WordPress Trac] #62159: Creation of dynamic property ftp::$features is deprecated (PHP 8.2)
WordPress Trac
noreply at wordpress.org
Sun Oct 20 17:47:16 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 has-patch | Focuses: php-compatibility
------------------------------------+--------------------------------
Comment (by peter8nss):
I think a better solution to the PHP deprecated problem would be to remove
the line from the constructor.
If I've understood correctly there is a class:
- Variable $_features
- Method $features...which uses that class variable
The class constructor has lines:
$this->_features=array();
...
$this->features=array();
The second one, which is producing the PHP deprecated error, shouldn't
have been added. Deleting that line would be the neatest fix.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62159#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list