Closed scottjo closed 1 month ago
Could you please try and reproduce this in a new repository? I see theres quite a lot of code in the existing one that is not related and I think there might be something weird in the setup that might be causing this. While you're reproducing from scratch, its quite likely that you'll find what might be wrong to provide more detailed information.
For example, you're currently using a BelongsToMany relationship, but your Select doesn't have multiple()
? I guess that's where the issue lies and I didn't account for that when I made the change. Not seen anyone do that before to be honest
HIya Dan - that seems to be the issue - by adding multiple() to the select field it works a treat. Thats my issue - at present the users want to have a single 'category' for a product but in the short to medium term they are going to move to the products belonging to more than one category. This worked in 3.2.78 but no longer in 3.2.83. I don't really want to go through my production code base removing those many-to-many relationships
(thanks for your help and for a great great product)
It should be a simple fix, I will work on it probably tomorrow and get a fix out
If you want to speed up the process, look on line 999 of Select.php and wrap that line in an Arr::wrap()
function call, and PR it in so I can quickly merge. If you do that I can squeeze it into todays release
Sorry Dan - away from my machine for the rest of the day. Thanks again for your help.JonSent from my iPhoneOn 29 May 2024, at 15:30, Dan Harrin @.***> wrote: If you want to speed up the process, look on line 999 of Select.php and wrap that line in an Arr::wrap() function call, and PR it in so I can quickly merge. If you do that I can squeeze it into todays release
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
Fixed by #13010
Package
filament/filament
Package Version
3.2.83
Laravel Version
11.9.1
Livewire Version
3.5.0
PHP Version
8.3.7
Problem description
Having composer updated from filament 3.2.78 to 3.2.83 my users are now getting an error when saving models getting the following error:
array_diff(): Argument #2 must be of type array, int given
Expected behavior
Editing and saving resources should work as expected. Rolling back the Filament version back to 3.2.78 it all works as expected
Steps to reproduce
Firstly create a category Secondly create a product - select a category from the select dropdown Save the product Error occurs
Reproduction repository
https://github.com/scottjo/genie.git
Relevant log output