Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong array pointer at end of _elementMatchers in SeriesMatchingOnce.php#34 #28

Open
3 tasks
h4cc opened this issue Jun 8, 2015 · 0 comments
Open
3 tasks

Comments

@h4cc
Copy link
Contributor

h4cc commented Jun 8, 2015

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant