Foreach error with repeater field
Hi, i have strange behaviour with a repeater field (never encountered before)
i have a simple repeater
when i create a new item, it works
when i try to edit an exhisting item, populated with a seeder
i have the error 'foreach() argument must be of type array|object, string given'
the field is a longtext field, with cast as array (but if i change cast to json is the same)
in the database, it saved like this (new from form)
while the seeder save like this
Solution:Jump to solution
I would use an array in the seeder... you have the cast setup in your model?
3 Replies