diff --git a/phpcompat.xml.dist b/phpcompat.xml.dist
index 3ff7f8b302..5af8e2a503 100644
a
|
b
|
|
74 | 74 | </rule> |
75 | 75 | |
76 | 76 | <!-- Whitelist the WP DB Class for use of `mysql_` extension in PHP < 7.0. --> |
77 | | <rule ref="PHPCompatibility.Extensions.RemovedExtensions"> |
| 77 | <rule ref="PHPCompatibility.Extensions.RemovedExtensions.mysql_DeprecatedRemoved"> |
78 | 78 | <exclude-pattern>/src/wp-includes/wp-db\.php</exclude-pattern> |
79 | 79 | </rule> |
80 | 80 | </ruleset> |
diff --git a/src/wp-admin/includes/class-ftp.php b/src/wp-admin/includes/class-ftp.php
index 8e2624cedc..cb8a033631 100644
a
|
b
|
function PopError(){ |
899 | 899 | $mod_sockets = extension_loaded( 'sockets' ); |
900 | 900 | if ( ! $mod_sockets && function_exists( 'dl' ) && is_callable( 'dl' ) ) { |
901 | 901 | $prefix = ( PHP_SHLIB_SUFFIX == 'dll' ) ? 'php_' : ''; |
902 | | @dl( $prefix . 'sockets.' . PHP_SHLIB_SUFFIX ); |
| 902 | @dl( $prefix . 'sockets.' . PHP_SHLIB_SUFFIX ); // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.dlDeprecated |
903 | 903 | $mod_sockets = extension_loaded( 'sockets' ); |
904 | 904 | } |
905 | 905 | |
diff --git a/src/wp-includes/ID3/module.audio-video.quicktime.php b/src/wp-includes/ID3/module.audio-video.quicktime.php
index cfe8ff5a8c..3c66199b1b 100644
a
|
b
|
public function Analyze() { |
114 | 114 | foreach ($info['quicktime']['comments']['location.ISO6709'] as $ISO6709string) { |
115 | 115 | $ISO6709parsed = array('latitude'=>false, 'longitude'=>false, 'altitude'=>false); |
116 | 116 | if (preg_match('#^([\\+\\-])([0-9]{2}|[0-9]{4}|[0-9]{6})(\\.[0-9]+)?([\\+\\-])([0-9]{3}|[0-9]{5}|[0-9]{7})(\\.[0-9]+)?(([\\+\\-])([0-9]{3}|[0-9]{5}|[0-9]{7})(\\.[0-9]+)?)?/$#', $ISO6709string, $matches)) { |
117 | | @list($dummy, $lat_sign, $lat_deg, $lat_deg_dec, $lon_sign, $lon_deg, $lon_deg_dec, $dummy, $alt_sign, $alt_deg, $alt_deg_dec) = $matches; |
| 117 | @list($dummy, $lat_sign, $lat_deg, $lat_deg_dec, $lon_sign, $lon_deg, $lon_deg_dec, $dummy, $alt_sign, $alt_deg, $alt_deg_dec) = $matches; // phpcs:ignore PHPCompatibility.Lists.AssignmentOrder.Affected |
118 | 118 | |
119 | 119 | if (strlen($lat_deg) == 2) { // [+-]DD.D |
120 | 120 | $ISO6709parsed['latitude'] = (($lat_sign == '-') ? -1 : 1) * floatval(ltrim($lat_deg, '0').$lat_deg_dec); |
diff --git a/src/wp-includes/capabilities.php b/src/wp-includes/capabilities.php
index 24b0aa9e0a..e3c28a1cf1 100644
a
|
b
|
function map_meta_cap( $cap, $user_id, ...$args ) { |
290 | 290 | case 'edit_user_meta': |
291 | 291 | case 'delete_user_meta': |
292 | 292 | case 'add_user_meta': |
293 | | list( $_, $object_type, $_ ) = explode( '_', $cap ); |
294 | | $object_id = (int) $args[0]; |
| 293 | $object_type = explode( '_', $cap )[1]; |
| 294 | $object_id = (int) $args[0]; |
295 | 295 | |
296 | 296 | $object_subtype = get_object_subtype( $object_type, $object_id ); |
297 | 297 | |
diff --git a/src/wp-includes/class-requests.php b/src/wp-includes/class-requests.php
index e9773800cb..34f7b6121b 100644
a
|
b
|
protected static function get_transport($capabilities = array()) { |
187 | 187 | |
188 | 188 | // Don't search for a transport if it's already been done for these $capabilities |
189 | 189 | if (isset(self::$transport[$cap_string]) && self::$transport[$cap_string] !== null) { |
190 | | return new self::$transport[$cap_string](); |
| 190 | $class = self::$transport[$cap_string]; |
| 191 | return new $class(); |
191 | 192 | } |
192 | 193 | // @codeCoverageIgnoreEnd |
193 | 194 | |
… |
… |
protected static function get_transport($capabilities = array()) { |
214 | 215 | throw new Requests_Exception('No working transports found', 'notransport', self::$transports); |
215 | 216 | } |
216 | 217 | |
217 | | return new self::$transport[$cap_string](); |
| 218 | $class = self::$transport[$cap_string]; |
| 219 | return new $class(); |
218 | 220 | } |
219 | 221 | |
220 | 222 | /**#@+ |
diff --git a/src/wp-includes/class-simplepie.php b/src/wp-includes/class-simplepie.php
index 651bf60e3c..6bb5bf75fc 100644
a
|
b
|
public function __call($method, $args) |
3165 | 3165 | } |
3166 | 3166 | |
3167 | 3167 | $class = get_class($this); |
3168 | | $trace = debug_backtrace(); |
| 3168 | $trace = debug_backtrace(); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection |
3169 | 3169 | $file = $trace[0]['file']; |
3170 | 3170 | $line = $trace[0]['line']; |
3171 | 3171 | trigger_error("Call to undefined method $class::$method() in $file on line $line", E_USER_ERROR); |
diff --git a/src/wp-includes/cron.php b/src/wp-includes/cron.php
index 7337ba307e..6f50cc7f95 100644
a
|
b
|
function wp_clear_scheduled_hook( $hook, $args = array() ) { |
402 | 402 | // Previously, this function took the arguments as discrete vars rather than an array like the rest of the API. |
403 | 403 | if ( ! is_array( $args ) ) { |
404 | 404 | _deprecated_argument( __FUNCTION__, '3.0.0', __( 'This argument has changed to an array to match the behavior of the other cron functions.' ) ); |
405 | | $args = array_slice( func_get_args(), 1 ); |
| 405 | $args = array_slice( func_get_args(), 1 ); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection |
406 | 406 | } |
407 | 407 | |
408 | 408 | /** |
diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
index c319965fb9..35c1e2e2f3 100644
a
|
b
|
function mbstring_binary_safe_encoding( $reset = false ) { |
6627 | 6627 | static $overloaded = null; |
6628 | 6628 | |
6629 | 6629 | if ( is_null( $overloaded ) ) { |
6630 | | $overloaded = function_exists( 'mb_internal_encoding' ) && ( ini_get( 'mbstring.func_overload' ) & 2 ); |
| 6630 | $overloaded = function_exists( 'mb_internal_encoding' ) && ( ini_get( 'mbstring.func_overload' ) & 2 ); // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated |
6631 | 6631 | } |
6632 | 6632 | |
6633 | 6633 | if ( false === $overloaded ) { |
diff --git a/src/wp-includes/plugin.php b/src/wp-includes/plugin.php
index dc4ec0deb1..2a97c9eba5 100644
a
|
b
|
function apply_filters_ref_array( $tag, $args ) { |
231 | 231 | // Do 'all' actions first. |
232 | 232 | if ( isset( $wp_filter['all'] ) ) { |
233 | 233 | $wp_current_filter[] = $tag; |
234 | | $all_args = func_get_args(); |
| 234 | $all_args = func_get_args(); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection |
235 | 235 | _wp_call_all_hook( $all_args ); |
236 | 236 | } |
237 | 237 | |
… |
… |
function do_action( $tag, ...$arg ) { |
453 | 453 | // Do 'all' actions first. |
454 | 454 | if ( isset( $wp_filter['all'] ) ) { |
455 | 455 | $wp_current_filter[] = $tag; |
456 | | $all_args = func_get_args(); |
| 456 | $all_args = func_get_args(); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection |
457 | 457 | _wp_call_all_hook( $all_args ); |
458 | 458 | } |
459 | 459 | |
… |
… |
function do_action_ref_array( $tag, $args ) { |
526 | 526 | // Do 'all' actions first. |
527 | 527 | if ( isset( $wp_filter['all'] ) ) { |
528 | 528 | $wp_current_filter[] = $tag; |
529 | | $all_args = func_get_args(); |
| 529 | $all_args = func_get_args(); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection |
530 | 530 | _wp_call_all_hook( $all_args ); |
531 | 531 | } |
532 | 532 | |
diff --git a/src/wp-includes/pomo/streams.php b/src/wp-includes/pomo/streams.php
index 8d8a2edcc7..52228d9120 100644
a
|
b
|
class POMO_Reader { |
18 | 18 | * PHP5 constructor. |
19 | 19 | */ |
20 | 20 | function __construct() { |
21 | | $this->is_overloaded = ( ( ini_get( 'mbstring.func_overload' ) & 2 ) != 0 ) && function_exists( 'mb_substr' ); |
| 21 | $this->is_overloaded = ( ( ini_get( 'mbstring.func_overload' ) & 2 ) != 0 ) && function_exists( 'mb_substr' ); // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated |
22 | 22 | $this->_pos = 0; |
23 | 23 | } |
24 | 24 | |
diff --git a/src/wp-includes/rss.php b/src/wp-includes/rss.php
index 208ca72004..ffc2494789 100644
a
|
b
|
function map_attrs($k, $v) { |
385 | 385 | } |
386 | 386 | |
387 | 387 | function error( $errormsg, $lvl = E_USER_WARNING ) { |
388 | | // append PHP's error message if track_errors enabled |
389 | | if ( isset($php_errormsg) ) { |
390 | | $errormsg .= " ($php_errormsg)"; |
391 | | } |
392 | 388 | if ( MAGPIE_DEBUG ) { |
393 | 389 | trigger_error( $errormsg, $lvl); |
394 | 390 | } else { |
… |
… |
function file_name ($url) { |
821 | 817 | Purpose: register error |
822 | 818 | \*=======================================================================*/ |
823 | 819 | function error ($errormsg, $lvl=E_USER_WARNING) { |
824 | | // append PHP's error message if track_errors enabled |
825 | | if ( isset($php_errormsg) ) { |
826 | | $errormsg .= " ($php_errormsg)"; |
827 | | } |
828 | 820 | $this->ERROR = $errormsg; |
829 | 821 | if ( MAGPIE_DEBUG ) { |
830 | 822 | trigger_error( $errormsg, $lvl); |