Skip to content

Commit c287c3b

Browse files
authored
Set index in loop.
1 parent d6a3f2e commit c287c3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/FilesUploadAndImageResize.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ 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 (isset($_FILES[$fileParamName]['error']) && ($_FILES[$fileParamName]['error']) > 0) {
187+
if (isset($_FILES[$fileParamName]['error'][$this->n]) && $_FILES[$fileParamName]['error'][$this->n] > 0) {
188188
$this->param['not_uploaded_files'][] = $fileName; //All not move files name into the destination folder [ Note: Check Folder Permission ]
189189
$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 {

0 commit comments

Comments
 (0)