Skip to content

Commit

Permalink
init file and files var
Browse files Browse the repository at this point in the history
  • Loading branch information
haohetao authored May 8, 2020
1 parent 7d6e4c0 commit 50c4413
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 ($files) {
Expand Down

0 comments on commit 50c4413

Please sign in to comment.