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

[10.x] fix: prevent casting empty string to array from triggering json error #52415

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

calebdw
Copy link
Contributor

@calebdw calebdw commented Aug 7, 2024

Hello!

Please see #52293 (comment) for context.

This PR prevents json errors being triggered when trying to cast Model attributes with empty strings (invalid json) to an array.

Thanks!

@taylorotwell taylorotwell merged commit 0138d78 into laravel:10.x Aug 7, 2024
24 checks passed
@calebdw
Copy link
Contributor Author

calebdw commented Aug 7, 2024

Thank you sir!

@calebdw calebdw deleted the model_fromJson branch August 7, 2024 21:08
@Arkhas
Copy link

Arkhas commented Aug 9, 2024

when will this be applied to Laravel 11 ?

@driesvints
Copy link
Member

@Arkhas next Tuesday most likely

@MiniCodeMonkey
Copy link
Contributor

@driesvints Hey Dries! Will this make the Laravel 11 cut today? I just spent a couple of hours pulling my hair out debugging this issue this morning and was super relieved to find this PR.

@driesvints
Copy link
Member

Tomorrow. We didn't do releases last week.

@MiniCodeMonkey
Copy link
Contributor

All good. Thanks @driesvints 🙌

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.

5 participants