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

fix Exception: Cannot traverse an already closed generator when running Arr::first with an empty generator and no callback #48851

Merged
merged 3 commits into from
Oct 29, 2023

Conversation

moshe-autoleadstar
Copy link
Contributor

$cursor = (function () {
    while (false) {
        yield 1;
    }
})();

Before

Arr::first($cursor); //  Exception  Cannot traverse an already closed generator.

After

Arr::first($cursor); // null

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 this pull request may close these issues.

2 participants