1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[feature/attach-dl] phpbb_check_attach_extensions: Get rid of pass-by-reference

PHPBB3-11042
This commit is contained in:
Andreas Fischer
2012-08-07 02:47:18 +02:00
parent b6d4ee4244
commit bba348d68a
2 changed files with 10 additions and 18 deletions

View File

@@ -285,16 +285,9 @@ else if ($download_id)
// disallowed?
$extensions = $cache->obtain_attach_extensions($row['forum_id']);
if ($attachment)
{
$ary = array($attachment);
}
else
{
$ary = &$attachments;
}
if (!phpbb_check_attach_extensions($extensions, $ary))
$attachments_filtered = phpbb_filter_disallowed_extensions($extensions, array($attachment));
if (empty($attachments_filtered))
{
send_status_line(404, 'Forbidden');
trigger_error(sprintf($user->lang['EXTENSION_DISABLED_AFTER_POSTING'], $attachment['extension']));