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 #66588: SplFileObject::fgetcsv incorrectly returns a row on premature EOF. #7535

Closed
wants to merge 2 commits into from

Conversation

Flashwade1990
Copy link
Contributor

This bug is about the different behavior with and without trailing newline.

…ture EOF. This bug is about the different behavior with and without trailing newline.
@nikic
Copy link
Member

nikic commented Sep 30, 2021

We discussed this behavior some time ago (cc @cmb69), but I don't think we really reached a conclusion on what to do with it. I'm inclined to accept to accept this, as the current distinction really doesn't make sense to me. I'd go for PHP-8.1 only though -- even as a bug fix, this is a subtle behavior change, and as such risky for released versions.

}
zend_array_destroy(Z_ARR_P(return_value));
RETVAL_FALSE;
goto quit_loop_2;
goto out;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
goto out;

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.

3 participants