aboutsummaryrefslogtreecommitdiff
path: root/phpBB
diff options
context:
space:
mode:
authorRubén Calvo <rubencm@gmail.com>2018-08-21 00:22:47 +0200
committerRubén Calvo <rubencm@gmail.com>2018-08-21 03:49:12 +0200
commit00938c25898303dde7f40b1315afbcbb4859d49f (patch)
tree82d017b4040fba2ca06a9483da0ce9d827d64a23 /phpBB
parentMerge pull request #5317 from rubencm/ticket/15747 (diff)
downloadphpbb-00938c25898303dde7f40b1315afbcbb4859d49f.tar.gz
phpbb-00938c25898303dde7f40b1315afbcbb4859d49f.tar.bz2
phpbb-00938c25898303dde7f40b1315afbcbb4859d49f.zip
[ticket/15760] Fix write_stream
PHPBB3-15760
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/acp/acp_database.php2
-rw-r--r--phpBB/phpbb/attachment/upload.php2
-rw-r--r--phpBB/phpbb/files/filespec_storage.php2
-rw-r--r--phpBB/phpbb/storage/adapter/local.php2
-rw-r--r--phpBB/phpbb/storage/storage.php1
5 files changed, 3 insertions, 6 deletions
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index cb40ac547e..bd9f767d39 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -192,8 +192,6 @@ class acp_database
fclose($fp);
}
- $storage->track_file($file);
-
// Remove file from tmp
@unlink($temp_dir . '/' . $file);
diff --git a/phpBB/phpbb/attachment/upload.php b/phpBB/phpbb/attachment/upload.php
index 6202798e05..37978944aa 100644
--- a/phpBB/phpbb/attachment/upload.php
+++ b/phpBB/phpbb/attachment/upload.php
@@ -254,8 +254,6 @@ class upload
{
fclose($fp);
}
-
- $this->storage->track_file($destination_name);
}
else
{
diff --git a/phpBB/phpbb/files/filespec_storage.php b/phpBB/phpbb/files/filespec_storage.php
index 5f3b895a05..adf4135193 100644
--- a/phpBB/phpbb/files/filespec_storage.php
+++ b/phpBB/phpbb/files/filespec_storage.php
@@ -456,8 +456,6 @@ class filespec_storage
{
fclose($fp);
}
-
- $storage->track_file($this->destination_file);
}
catch (\phpbb\storage\exception\exception $e)
{
diff --git a/phpBB/phpbb/storage/adapter/local.php b/phpBB/phpbb/storage/adapter/local.php
index c7fbe544e9..70df8043c8 100644
--- a/phpBB/phpbb/storage/adapter/local.php
+++ b/phpBB/phpbb/storage/adapter/local.php
@@ -348,6 +348,8 @@ class local implements adapter_interface, stream_interface
fclose($stream);
throw new exception('STORAGE_CANNOT_COPY_RESOURCE');
}
+
+ fclose($stream);
}
/**
diff --git a/phpBB/phpbb/storage/storage.php b/phpBB/phpbb/storage/storage.php
index 97d71048ee..869c84b3eb 100644
--- a/phpBB/phpbb/storage/storage.php
+++ b/phpBB/phpbb/storage/storage.php
@@ -226,6 +226,7 @@ class storage
if ($adapter instanceof stream_interface)
{
$adapter->write_stream($path, $resource);
+ $this->track_file($path);
}
else
{