From 8e2de8212ba5726b5ef6cde868bf9fb4d039a21e Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 1 May 2020 19:05:04 +0000 Subject: [PATCH] General: Fix various issues flagged by the PHPCompatibilityWP PHPCS ruleset. As part of the continued effort to improve PHP compatibility, the following improvments are being made: - Removing deprecated PHP `safe_mode` checks not found in bundled external libraries. - Change the remaining `while` loops using `each()` to `foreach` loops. - Prevent false positives from being flagged for the `sodium_compat` library being caused by loading this in a non-standard way. - Add inline comments to not flag deprecated PHP directives in the getID3 library. Props desrosj, earnjam, dryanpress. See #49922. git-svn-id: https://develop.svn.wordpress.org/trunk@47735 602fd350-edb4-49c9-b593-d223f7449a82 --- phpcompat.xml.dist | 16 ++++++++++++++++ src/wp-admin/includes/schema.php | 9 +-------- src/wp-includes/ID3/getid3.php | 8 ++++---- src/wp-includes/class-snoopy.php | 28 ++++++++++++++-------------- 4 files changed, 35 insertions(+), 26 deletions(-) diff --git a/phpcompat.xml.dist b/phpcompat.xml.dist index 727796c908..3ff7f8b302 100644 --- a/phpcompat.xml.dist +++ b/phpcompat.xml.dist @@ -40,6 +40,22 @@ --> /vendor/* + + src/wp-includes/sodium_compat/lib/php72compat_const\.php$ + + + /sodium_compat/src/Compat\.php$ + + + /sodium_compat/src/Compat\.php$ + + + /sodium_compat/src/Compat\.php$ + +