Wrong array pointer at end of _elementMatchers in SeriesMatchingOnce.php#34
h4cc opened this issue · 1 comments
h4cc commented
When running the test with HHVM, a unexpected behaviour appears in https://github.com/hamcrest/hamcrest-php/blob/master/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php#L34
in this line:
$nextMatcher = current($this->_elementMatchers);
Failing travis build:
https://travis-ci.org/hamcrest/hamcrest-php/jobs/65859156
The problem was encountered in this Pull-Request: #27
Even though the array still contains 3 matchers, the function current
return false because the internal array point is at the end of the file.
Todo:
- Reproduce with PHP 5.3-5.6 using a PHPUnit test.
- Locate where the array pointer is changed to wrong value.
- Fix the cause.