mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[feature/attach-dl] phpbb_filter_disallowed_extensions: Preserve array keys.
PHPBB3-11042
This commit is contained in:
parent
bba348d68a
commit
89c102a744
1 changed files with 2 additions and 2 deletions
|
@ -625,11 +625,11 @@ function phpbb_increment_downloads($db, $ids)
|
||||||
function phpbb_filter_disallowed_extensions($extensions, $attachments)
|
function phpbb_filter_disallowed_extensions($extensions, $attachments)
|
||||||
{
|
{
|
||||||
$result = array();
|
$result = array();
|
||||||
foreach ($attachments as $row)
|
foreach ($attachments as $key => $row)
|
||||||
{
|
{
|
||||||
if (isset($extensions['_allowed_'][$row['extension']]))
|
if (isset($extensions['_allowed_'][$row['extension']]))
|
||||||
{
|
{
|
||||||
$result[] = $row;
|
$result[$key] = $row;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue