aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2018-01-11 21:00:19 +0100
committerMarc Alexander <admin@m-a-styles.de>2018-01-11 21:00:19 +0100
commit350d4f3e6d8a5e4e2910a046f0097b74d51861ef (patch)
treeb55e5dd3953566225b9b634eed0b285b3723817f /phpBB/includes/functions_posting.php
parentf26cf2dc1f2c58ac6cf97974aafa749688cacbaa (diff)
downloadforums-350d4f3e6d8a5e4e2910a046f0097b74d51861ef.tar
forums-350d4f3e6d8a5e4e2910a046f0097b74d51861ef.tar.gz
forums-350d4f3e6d8a5e4e2910a046f0097b74d51861ef.tar.bz2
forums-350d4f3e6d8a5e4e2910a046f0097b74d51861ef.tar.xz
forums-350d4f3e6d8a5e4e2910a046f0097b74d51861ef.zip
[ticket/15506] Assign attachrow_template_vars before foreach
The attachrow_template_vars array needs to be defined once in front of the foreach instead of resetting the array on every iteration of the foreach. PHPBB3-15506
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 21f31c9fa2..78c66ac6b8 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -727,10 +727,11 @@ function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_a
// We display the posted attachments within the desired order.
($config['display_order']) ? krsort($attachment_data) : ksort($attachment_data);
+ $attachrow_template_vars = [];
+
foreach ($attachment_data as $count => $attach_row)
{
$hidden = '';
- $attachrow_template_vars = array();
$attach_row['real_filename'] = utf8_basename($attach_row['real_filename']);
foreach ($attach_row as $key => $value)