lunarphp / lunar

An open-source package that brings the power of modern headless e-commerce functionality to Laravel.
https://lunarphp.io
MIT License
2.71k stars 357 forks source link

Fix number field setter #1970

Open ken717w opened 1 month ago

ken717w commented 1 month ago

Do data type casting from String to either int or float.

This should fixes #1969.

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lunar-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 19, 2024 11:17pm
ken717w commented 1 month ago

The tests failed, are there some sort of linting rules?

alecritson commented 1 month ago

The tests failed, are there some sort of linting rules?

Spotted that, pushed a quick patch which should sort it, it was due to $value being an empty string. Although not sure if that will work if you pass a 0 thinking about it 😱