Make WordPress Core


Ignore:
Timestamp:
10/02/2015 01:50:04 PM (11 years ago)
Author:
boonebgorges
Message:

Fix preg_match_all() syntax in PCRE benchmark test util.

In versions of PHP earlier than 5.4, the $matches parameter was required.
Excluding it here meant that PCRE benchmarking tests were erroring on older
versions of PHP without cleaning up the PCRE ini settings, causing various
problems on later tests.

Props miqrogroove, dd32, boonebgorges.

And to the cosmic forces that cause bugs like this. The best part of waking up
is diagnosing leakage between automated tests.

See #34121.

File:
1 edited

Legend:

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

    r34761 r34772  
    420420                        break;
    421421                case 'match_all':
    422                         preg_match_all( $pattern, $subject );
     422                        $matches = array();
     423                        preg_match_all( $pattern, $subject, $matches );
    423424                        break;
    424425                }
Note: See TracChangeset for help on using the changeset viewer.