Skip to content

Commit d6a3f2e

Browse files
authored
fix index of file.
1 parent da2292a commit d6a3f2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/FilesUploadAndImageResize.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ public function uploadFiles(string $fileParamName, int $minImgWidth = 400, array
184184
if (in_array(strtolower($fileInfo), array_map('strtolower', $this->allowExtension)) || empty($this->allowExtension)) {
185185
// Upload and compress only images
186186
if (strtolower($fileInfo) == 'gif' || strtolower($fileInfo) == 'jpeg' || strtolower($fileInfo) == 'jpg' || strtolower($fileInfo) == 'png') {
187-
if ($_FILES[$fileParamName]['tmp_name']['error'] > 0) {
187+
if (isset($_FILES[$fileParamName]['error']) && ($_FILES[$fileParamName]['error']) > 0) {
188188
$this->param['not_uploaded_files'][] = $fileName; //All not move files name into the destination folder [ Note: Check Folder Permission ]
189-
$this->param['not_uploaded_files_error'][] = $this->phpFileUploadErrors[$_FILES[$fileParamName]['tmp_name']['error']]; //All not move files name into the destination folder with error [ Note: Check Folder Permission ]
189+
$this->param['not_uploaded_files_error'][] = $this->phpFileUploadErrors[$_FILES[$fileParamName]['error']]; //All not move files name into the destination folder with error [ Note: Check Folder Permission ]
190190
} else {
191191
if ($this->compressImage($_FILES[$fileParamName]['tmp_name'][$this->n], $filePath, $minImgWidth, $waterMark, $quality, $newWidth)) {
192192
if (isset($thumbWidth) && !empty($thumbWidth)) {

0 commit comments

Comments
 (0)