Make WordPress Core


Ignore:
Timestamp:
09/28/2017 11:14:26 PM (7 years ago)
Author:
johnbillion
Message:

Build/Test tools: Update the WP_PHPUnit_Util_Getopt class for PHP 7.2 compatibility.

This removes usage of each() which is deprecated in PHP 7.2.

Props ayeshrajans

See #40109
Fixes #41525

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/bootstrap.php

    r40536 r41636  
    133133        array_shift( $argv );
    134134        $options = array();
    135         while ( list( $i, $arg ) = each( $argv ) ) {
     135        while ( current( $argv ) ) {
     136            $arg = current( $argv );
     137            next( $argv );
    136138            try {
    137139                if ( strlen( $arg ) > 1 && $arg[0] === '-' && $arg[1] === '-' ) {
Note: See TracChangeset for help on using the changeset viewer.