diff --git a/src/Illuminate/Database/Eloquent/Model.php b/src/Illuminate/Database/Eloquent/Model.php index bf7d1c96c004..5133718ba7bc 100644 --- a/src/Illuminate/Database/Eloquent/Model.php +++ b/src/Illuminate/Database/Eloquent/Model.php @@ -1153,7 +1153,7 @@ public function refresh() $this->load(collect($this->relations)->reject(function ($relation) { return $relation instanceof Pivot - || in_array(AsPivot::class, class_uses_recursive($relation), true); + || (is_object($relation) && in_array(AsPivot::class, class_uses_recursive($relation), true)); })->keys()->all()); $this->syncOriginal(); diff --git a/src/Illuminate/Foundation/Application.php b/src/Illuminate/Foundation/Application.php index 8df2c3c21fa9..cf7cc8aa7fa5 100755 --- a/src/Illuminate/Foundation/Application.php +++ b/src/Illuminate/Foundation/Application.php @@ -31,7 +31,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn * * @var string */ - const VERSION = '6.18.9'; + const VERSION = '6.18.10'; /** * The base path for the Laravel installation.