diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 2a0ecd2b53..b46a8b2a45 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -873,7 +873,7 @@ function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_a 'phpbb_storage_attachment', [ 'file' => (int) $attach_row['attach_id'], - 'filename' => $attachment['real_filename'], + 'filename' => $attach_row['real_filename'], ] ); diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index 912769f70e..6b7fa8733c 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -1720,7 +1720,7 @@ class parse_message extends bbcode_firstpass 'phpbb_storage_attachment', [ 'file' => (int) $new_entry['attach_id'], - 'filename' => $attachment['real_filename'], + 'filename' => $new_entry['real_filename'], ] );