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

ArraySubsetConstraint use invalid cast to array #2568

Closed
bburnichon opened this issue Mar 15, 2017 · 0 comments
Closed

ArraySubsetConstraint use invalid cast to array #2568

bburnichon opened this issue Mar 15, 2017 · 0 comments

Comments

@bburnichon
Copy link
Contributor

Q A
PHPUnit version 5.7
PHP version all
Installation Method Composer / PHAR
        //type cast $other & $this->subset as an array to allow
        //support in standard array functions.
        if ($other instanceof ArrayAccess) {
            $other = (array) $other;
        }

This actually only works with ArrayObject instances. See https://3v4l.org/ti4aY for simple implementation.

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

2 participants