2026-10-13, 03:15 PM
(This post was last modified: 2026-10-13, 03:42 PM by Shooting. Edited 4 times in total.)
Found a bug in attachment.php
At Line 137: There's an extra "," at the end ['filename'] that needs deleting at the end of the following:
-----------------------------------------------------------------------------------------------------------------------------------
// basename isn't UTF-8 safe. This is a workaround.
$attachment['filename'] = ltrim(basename(' '.$attachment['filename']));
// prevent header omission by PHP's header()
$attachment['filename'] = str_replace(
array("\r", "\n", "\0"),
'',
$attachment['filename'],
);
-----------------------------------------------------------------------------------------------------------------------------------
At Line 137: There's an extra "," at the end ['filename'] that needs deleting at the end of the following:
-----------------------------------------------------------------------------------------------------------------------------------
// basename isn't UTF-8 safe. This is a workaround.
$attachment['filename'] = ltrim(basename(' '.$attachment['filename']));
// prevent header omission by PHP's header()
$attachment['filename'] = str_replace(
array("\r", "\n", "\0"),
'',
$attachment['filename'],
);
-----------------------------------------------------------------------------------------------------------------------------------