diff options
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions_admin.php | 1 | ||||
-rw-r--r-- | phpBB/includes/functions_posting.php | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index aafac876a5..228de95996 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -1125,6 +1125,7 @@ function delete_attachments($mode, $ids, $resync = true) $attachment_delete = $phpbb_container->get('attachment.delete'); $num_deleted = $attachment_delete->delete($mode, $ids, $resync); + unset($attachment_delete); return $num_deleted; } diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index d4923de60c..c39b9470a3 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -408,8 +408,10 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage /** @var \phpbb\attachment\upload $attachment_upload */ $attachment_upload = $phpbb_container->get('attachment.upload'); + $file = $attachment_upload->upload($form_name, $forum_id, $local, $local_storage, $is_message, $local_filedata); + unset($attachment_upload); - return $attachment_upload->upload($form_name, $forum_id, $local, $local_storage, $is_message, $local_filedata); + return $file; } /** |