Skip to content

Don't let A & B be null when an empty array is passed #15

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

niekp
Copy link

@niekp niekp commented Mar 27, 2023

When passing an empty array to Diff the setSeq1 and setSeq2 check on null == [] will pass and a & b stay null.

This will cause an exception in getMatchingBlocks's count($this->a) on PHP 8.

In PHP 7.4 the count could handle null, but not anymore.
https://www.php.net/manual/en/function.count.php

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant