Skip to content

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

Merged
taylorotwell merged 1 commit intolaravel:10.xfrom
calebdw:model_fromJson
Aug 7, 2024
Merged

[10.x] fix: prevent casting empty string to array from triggering json error#52415
taylorotwell merged 1 commit intolaravel:10.xfrom
calebdw:model_fromJson

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
@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