aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-09-21 10:13:26 +0200
committerMarc Alexander <admin@m-a-styles.de>2015-10-09 09:53:07 +0200
commit4709c8a12884563170e0c1d3aaa65b893c98ed53 (patch)
tree663d14b026af5ebaa14af240787137436f67de28
parent2ce73a22e76ed021ec06cb29cd84af8b10f77c48 (diff)
downloadforums-4709c8a12884563170e0c1d3aaa65b893c98ed53.tar
forums-4709c8a12884563170e0c1d3aaa65b893c98ed53.tar.gz
forums-4709c8a12884563170e0c1d3aaa65b893c98ed53.tar.bz2
forums-4709c8a12884563170e0c1d3aaa65b893c98ed53.tar.xz
forums-4709c8a12884563170e0c1d3aaa65b893c98ed53.zip
[ticket/14168] Unset prototype classes after use
PHPBB3-14168
-rw-r--r--phpBB/includes/functions_admin.php1
-rw-r--r--phpBB/includes/functions_posting.php4
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;
}
/**