Notice: Undefined variable: info in webform_file_gateway_file_download() (line 294 of webform_file_gateway/webform_file_gateway.module).

The info variable is not initialized.

CommentFileSizeAuthor
#3 undefined_variable-2377885-1.patch969 bytesJitujain
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rst’s picture

line 294:

return array('Content-Type' => $info['mime_type']);

should be replaced with

return array('Content-Type' => $file->filemime);

Roy

rst’s picture

Alternatively, add this prior to line 294:

$info = image_get_info($uri);

But seems better to use $file->filemime since it has already that loaded.

The use of $info probably came from here

Jitujain’s picture

Apply this patch.

DamienMcKenna’s picture

Status: Active » Needs review

Don't forget to set the issue status to "Needs review" after uploading a patch.