Error edit on API
Testing API function, using insomnia I get this error when edit a post:
ErrorException (E_WARNING) json_decode() expects parameter 1 to be string, object given
Ideas?
I have found out that in my installation of Wave.
tcg/voyager v1.1.10
laravel/framework v5.6.38
data_rows->details get empty json as value. {}. It seems NULL or blank is for all existing data. Is this new in Voyager?
At least it makes Wave crash in ApiController:L238 - $options = json_decode($row->details); it seems $row->details then returns an object of stdClass and not a string, causing json_decode to crash. Also putting valid jsoncode will make this crash. Is it Eloquent that is changed? It seems to not return string, but objects instead.
It seems this pull: https://github.com/the-control-group/voyager/pull/3637 breaks Wave. You should get Wave up with automatic testing before releasing it.
Json_decode can probably be removed from ApiController.
Just remove json_decode from ApiController.php. it fixes the problem