Skip to content

Commit

Permalink
check if model is object
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterRO94 committed Nov 7, 2017
1 parent 33b06a6 commit 1dd15ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FileCleaner.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ protected function removeFiles(array $files)
if (! $model) throw new ModelNotFoundException(
sprintf(
"'Instance of [%s] not found with '%s' by '%s' field.'",
get_class($model),
is_object($model) ? get_class($model) : $model,
$fileBasename,
$this->fileField
)
Expand Down

0 comments on commit 1dd15ba

Please sign in to comment.