[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 16:46:22 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
----------------------------+--------------------------------
Comment (by kmurphyzuora):
Good morning,
Adding a local property does fix it from my initial testing. One thing I
found was this is also a method with the same name.
{{{#!php
<?php
$this->features // Is never accessed as an array
}}}
{{{#!php
<?php
$this->_features // Is accessed as an array
}}}
{{{#!php
<?php
// Line 491
function features() {
if(!$this->_exec("FEAT", "features")) return FALSE;
if(!$this->_checkCode()) return FALSE;
$f=preg_split("/[".CRLF."]+/", preg_replace("/[0-9]{3}[
-].*[".CRLF."]+/", "", $this->_message), -1, PREG_SPLIT_NO_EMPTY);
$this->_features=array();
foreach($f as $k=>$v) {
$v=explode(" ", trim($v));
$this->_features[array_shift($v)]=$v;
}
return true;
}
}}}
{{{#!php
<?php
class ftp_base // Don't see any polymorphism with any other class
}}}
I created a branch with my fix, but on my work computer I don't have push
write to the https://github.com/WordPress/wordpress-develop repository.
I'm going to chat with my boss today and see if I can work on this fix
using my work computer.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62159#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list