diff --git a/composer.json b/composer.json index a30d4d1..821c9a9 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "fill" ], "license": "MIT", - "version": "3.0.2", + "version": "3.0.3", "authors": [ { "name": "kolirt" diff --git a/src/MasterModel.php b/src/MasterModel.php index 1e66eef..10eec03 100644 --- a/src/MasterModel.php +++ b/src/MasterModel.php @@ -97,7 +97,7 @@ public function fill(array $attributes) try { $path = $this->$key; - if ($value != $this->$key && file_exists(storage_path($path)) && $path) { + if (is_string($path) && $value != $this->$key && file_exists(storage_path($path)) && $path) { unlink(storage_path() . $path); } } catch (\Exception $e) {