[wp-trac] [WordPress Trac] #49922: PHP Compatibility fixes for 5.5

WordPress Trac noreply at wordpress.org
Mon Apr 27 18:02:13 UTC 2020


#49922: PHP Compatibility fixes for 5.5
-------------------------------------+-------------------------------
 Reporter:  desrosj                  |       Owner:  desrosj
     Type:  task (blessed)           |      Status:  assigned
 Priority:  normal                   |   Milestone:  5.5
Component:  General                  |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  coding-standards
-------------------------------------+-------------------------------
Changes (by desrosj):

 * keywords:   => has-patch needs-testing


Comment:

 [attachment:"49922.diff"] addresses a large handful of the remaining
 issues and when excluding errors/warnings flagged in bundled external
 libraries (explained below) brings the total number of flagged
 compatibility issues down to around 20.

 Some notes:

 I have been ignoring external libraries unless they are abandoned and
 WordPress now maintains its own version. Most of the flagged issues are
 fixed upstream.

 `safe_mode`: The instances still being flagged for this are in external
 libraries, all of which have been removed upstream. These will get fixed
 by other tickets updating the libraries to the latest versions:
 - SimplePie: #36669
 - PHPMailer: #41750
 There were also instances in the getID3 library that I added exclusions
 for. The library [https://www.getid3.org/still supports PHP 5.3.0].
 Because `safe_mode` was [https://www.php.net/manual/en/features.safe-
 mode.php deprecated in 5.3.0 and removed in 5.4.0], it cannot be removed
 upstream yet.

 `$php_errormsg`: This can be found only in `wp-includes/rss.php`, which is
 MagpieRSS, an outdated and deprecated library. This was
 [https://www.php.net/manual/en/reserved.variables.phperrormsg.php
 deprecated as of PHP 7.2.0]. I think that the `if()` statement in question
 could either be removed, or changed to use `error_get_last()`, but I also
 think that it could just receive an inline comment just in case sites with
 PHP < 7.2.0 are using this.

 I'll be opening a new ticket to remove references to the
 `$HTTP_RAW_POST_DATA` global variable just to give that a bit more
 visibility for feedback.

 There are flagged 4 occurrences of `func_get_args()`. #47678 moved to
 utilizing the spread operator for these instead, but these appear to have
 been missed or intentionally excluded. @jrf are you able to clarify? If
 they were intentionally skipped, we should just add inline comments to
 whitelist these.

 `mbstring.func_overload` usage also still needs to be addressed.

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


More information about the wp-trac mailing list