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

Csv: Fix unintended cast #1137

Merged
merged 1 commit into from
May 17, 2022
Merged

Csv: Fix unintended cast #1137

merged 1 commit into from
May 17, 2022

Conversation

ishitatsuyuki
Copy link
Contributor

Description

League CSV 9's ResultSet is an object and casting it to an array causes chaotic behavior. Just keep it as mixed.

CSV reader in 5.0 has been consistently malfunctioning in unpredictable ways, e.g. reporting different element count or reporting errors that are not at all helpful.

League CSV 9's ResultSet is an object and casting it to an array causes chaotic behavior. Just keep it as mixed.
@angrybrad
Copy link
Member

@ishitatsuyuki can you provide a sample feed and some steps to reproduce what you're trying to fix here? Generally speaking, anything that relies on Craft 4 is more strictly typed, not less.

@ishitatsuyuki
Copy link
Contributor Author

You should be able to reproduce the issue with any CSV, when League CSV 9.8 is used. Observe that the suggested row count is wrong.

If that is not sufficient, I used a two-column CSV with headers and 50 rows following that.

@angrybrad angrybrad merged commit 7cd69c8 into craftcms:main May 17, 2022
angrybrad added a commit that referenced this pull request May 17, 2022
@angrybrad
Copy link
Member

Just released 5.0.3 with this fix.

@ishitatsuyuki ishitatsuyuki deleted the patch-1 branch June 5, 2022 03:47
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