Skip to content

Conversation

@crynobone
Copy link
Member

fixes #53180

only empty string

fixes #53180

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
@crynobone crynobone marked this pull request as ready for review October 16, 2024 02:35
@crynobone crynobone changed the title [11.x] Handle empty values passed to enum_value() function instead of only empty string [11.x] Fix handling empty values passed to enum_value() function instead of only empty string Oct 16, 2024
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
@devajmeireles
Copy link
Contributor

@crynobone Do you believe it will fix Js::from function?

11.27
Illuminate\Support\Js::from([]) => []

11.28
Illuminate\Support\Js::from([]) => null

@crynobone
Copy link
Member Author

@devajmeireles did you check the tests in this PR? Feel free to add more if you see it missing anything

@taylorotwell taylorotwell merged commit c31b2f5 into 11.x Oct 16, 2024
32 checks passed
@taylorotwell taylorotwell deleted the fixes-53180 branch October 16, 2024 16:25
@devajmeireles
Copy link
Contributor

@devajmeireles did you check the tests in this PR? Feel free to add more if you see it missing anything

I'm so sorry! I didn't see the Js::from test.

@PHLAK
Copy link
Contributor

PHLAK commented Oct 17, 2024

This is still broken when an empty collection is passed into Js::from().

Js::from(Collection::make()); // null

This is specifically affecting eloquent query results for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

5 participants