stvnthomas / CodeIgniter-Multi-Upload

Multiple file upload support for CodeIgniter 2.x.
151 stars 158 forks source link

Problem uploading files with empty value. solved #9

Open maclau opened 10 years ago

maclau commented 10 years ago

i found an issue when my users let one o more of my inputs empty.

i put this code line in the line 262

$_FILES[$field]["name"] = array_filter($_FILES[$field]["name"]);

and solve my problem, i hope can help to fix the problem to another user.

MakHiren commented 10 years ago

i have tried buit it's not work

onlyjf77 commented 10 years ago

You can add below code to the line 280, just below of for($i=0; $i<count($_FILES[$field]["name"]); $i++){

Please paste below code to the line 280 // check empty file array if(empty($_FILES[$field]["tmp_name"][$i])){ continue; }

maksumon commented 10 years ago

Thanks, maclau, your fix is working like a charm...