From 20a2ceccbdbb47229750735bfcdf2a5d05353d95 Mon Sep 17 00:00:00 2001 From: Fyorl Date: Sat, 4 Aug 2012 14:10:26 +0100 Subject: [PATCH] [feature/attach-dl] Initialised arrays if they're used PHPBB3-11042 --- phpBB/download/file.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/download/file.php b/phpBB/download/file.php index 2346f9357c..f360132b0f 100644 --- a/phpBB/download/file.php +++ b/phpBB/download/file.php @@ -158,8 +158,8 @@ if (!$config['allow_attachments'] && !$config['allow_pm_attach']) trigger_error('ATTACHMENT_FUNCTIONALITY_DISABLED'); } -$attachment = false; -$attachments = false; +$attachment = ($download_id) ? array() : false; +$attachments = ($topic_id || $post_id) ? array() : false; if ($download_id) {