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:
@@ -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']));
|
||||
|
Reference in New Issue
Block a user