Laravel-Backpack / CRUD

Build custom admin panels. Fast!
https://backpackforlaravel.com
MIT License
3k stars 880 forks source link

initialize the variable as an empty array #5481

Closed pxpm closed 3 months ago

pxpm commented 3 months ago

Reported in #5480

I spent quite sometime trying to reproduce this issue.

It's was only possible to get this error if you were able to create a table without columns at all, thing that is not allowed at least in mysql and sqlite.

Apparently pgsql allow you to create an empty table, not sure if that's the case in the reported issue, it doesn't matter 🤷

We just init the columns to an empty array to fix this.