Make WordPress Core

Changeset 41637


Ignore:
Timestamp:
09/28/2017 11:16:18 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.

See #40109, #41525

Merges [41636] to the 4.8 branch.

Location:
branches/4.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.8

  • branches/4.8/tests/phpunit/includes/bootstrap.php

    r40536 r41637  
    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.