Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
haohetao committed May 30, 2020
2 parents 92f3707 + 50c4413 commit 087bb7e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/UploadBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -546,9 +546,10 @@ protected function getUploadInstance($attribute)
}
}
}
if (is_object($file)) {
$files = null;
if (isset($file) && is_object($file)) {
$files = [$file];
} else if (is_array($file)) {
} else if (isset($file) && is_array($file)) {
$files = $file;
}
if (isset($files) && is_array($files)) {
Expand Down

0 comments on commit 087bb7e

Please sign in to comment.