laravel-user-settings icon indicating copy to clipboard operation
laravel-user-settings copied to clipboard

Empty column error

Open IP-Developer opened this issue 8 years ago • 1 comments

I get array_key_exists() expects parameter 2 to be array, null given, when using Setting::has() in case when settings column has no value. Setting::all($user->id) returns null. It is not possible to set a default value of [] to a TEXT column. I think the package should check if the column is empty, as it overwrites the $settings property in the Setting class (at least it seems to).

IP-Developer avatar Dec 26 '16 22:12 IP-Developer

Using the get function can be a work around!

summerblue avatar Mar 26 '17 09:03 summerblue