Skip to content

Commit

Permalink
fixed is_file(): Passing null to parameter filename of type string is…
Browse files Browse the repository at this point in the history
… deprecated (#71)
  • Loading branch information
microinginer authored Oct 28, 2023
1 parent 2e43329 commit f81f64f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/UploadBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ protected function save($file, $path)
protected function delete($attribute, $old = false)
{
$path = $this->getUploadPath($attribute, $old);
if (is_file($path)) {
if (is_string($path) && is_file($path)) {
unlink($path);
}
}
Expand Down

0 comments on commit f81f64f

Please sign in to comment.