From 89c102a744ba9ea3eafefd47fd375342bcf6bbe4 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Tue, 7 Aug 2012 02:48:49 +0200 Subject: [PATCH] [feature/attach-dl] phpbb_filter_disallowed_extensions: Preserve array keys. PHPBB3-11042 --- phpBB/includes/functions_download.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/functions_download.php b/phpBB/includes/functions_download.php index 74c8be5f7b..8453469e83 100644 --- a/phpBB/includes/functions_download.php +++ b/phpBB/includes/functions_download.php @@ -625,11 +625,11 @@ function phpbb_increment_downloads($db, $ids) function phpbb_filter_disallowed_extensions($extensions, $attachments) { $result = array(); - foreach ($attachments as $row) + foreach ($attachments as $key => $row) { if (isset($extensions['_allowed_'][$row['extension']])) { - $result[] = $row; + $result[$key] = $row; } }