Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#3 | undefined_variable-2377885-1.patch | 969 bytes | Jitujain |
Comments
Comment #1
rst CreditAttribution: rst commentedline 294:
return array('Content-Type' => $info['mime_type']);
should be replaced with
return array('Content-Type' => $file->filemime);
Roy
Comment #2
rst CreditAttribution: rst commentedAlternatively, 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
Comment #3
Jitujain CreditAttribution: Jitujain at Innoraft commentedApply this patch.
Comment #4
DamienMcKennaDon't forget to set the issue status to "Needs review" after uploading a patch.