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.
For failed upload there was an stat performed on line 1284 of swftools.module, causing an warning to be displayed. I made the following modifications to fix it.
// Build an array of types that SWF Tools can react to
$mime_types = _swftools_mime_types();
// If file is one of the above types, based on the extension, return headers
$filepath = file_create_path($file);
$fileexists = file_exists($filepath);
if (isset($mime_types[$extension]) && $fileexists) {
return array(
'Content-Type: '. $mime_types[$extension],
'Content-Length: '. filesize($filepath),
);
}