I use upload of drupal core to attach file
When i not yet select any file and push "Attach" button. This bug show . (attach image)
Any one know why ?
Thanks !

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

congtu2002c’s picture

Priority: Normal » Critical
rouhipour.marjan’s picture

Hello,
Check the file name when uploading file.
Go to modules/upload/upload.module and modify "_upload_form" function.
Add"if($file->filename!='')" in for loop as follow:

foreach ($node->files as $key => $file) {
$file = (object)$file;
if($file->filename!=''){
$description = file_create_url($file->filepath);
.....
}
}

Hope it helps.

rouhipour.marjan’s picture

This is the patch file of this modificaiton in comment #2.

dddave’s picture

Priority: Critical » Normal
Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, upload-attach-file-1011442-3.patch, failed testing.

Fabianx’s picture

Patch needs work. Not sure we'll ever fix this for D6 though ...

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.