-
Notifications
You must be signed in to change notification settings - Fork 38
Description
Hi,
with an update from Laravel 9.34.0 to 9.36.3 I get this error when creating a view from database: Illegal offset type in isset or empty
I compared the files before and after the update and this is the commit that breaks this project:
laravel/framework@331bf9c
In DbView (https://github.com/Flynsarmy/laravel-db-blade-compiler/blob/master/src/Flynsarmy/DbBladeCompiler/DbView.php) the path is set to be the model: $this->path = $model;
Later the content is set to $this->path->__db_blade_compiler_content_field which is then passed over getContents() to the engine:
$this->engine->get($this->path, $this->gatherData())
Laravels compiler engine expects a string in "public function get($path, array $data = [])" and since that commit they even use that path an array key, which fails in the end, was currently a model is used.
I am not so deep into all the internal template handling, so I hope my findings can at least help you to fix this.
Marcus