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

Unexpected behavior of pair operation over empty collection #326

Closed
ghost opened this issue Dec 1, 2023 · 1 comment · Fixed by #327
Closed

Unexpected behavior of pair operation over empty collection #326

ghost opened this issue Dec 1, 2023 · 1 comment · Fixed by #327

Comments

@ghost
Copy link

ghost commented Dec 1, 2023

Steps required to reproduce the problem

See following code example:

Collection::fromIterable([])->pair()->all(false)

Expected Result

It was expected that code would return empty array []

Actual Result

But it returns following garbage information:

array:1 [
  "" => null
]
@drupol
Copy link
Collaborator

drupol commented Dec 1, 2023

Hi !

Thanks for reporting the issue, nice catch!

I fixed it in #327 and added a test.

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

Successfully merging a pull request may close this issue.

1 participant