-
Notifications
You must be signed in to change notification settings - Fork 360
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
Crash when an empty Traversable
is entered into randomElements()
#604
Comments
It expects an array and not a traversable. I do not really why this is a bug? |
Then i think it should be fixed that it crashes only under certain conditions. If we want consistency and correctness of behavior, we could remove the |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 1 week if no further activity occurs. Thank you for your contributions. |
Summary
Crash when an empty
Traversable
is entered intorandomElements()
Versions
fakerphp/faker
Self-enclosed code snippet for reproduction
Expected output
# replace this with the expected output of your self-enclosed example // Empty array should be returned.
Actual output
The text was updated successfully, but these errors were encountered: