From 6d9a8ae8afce9b45bebd55abb58d3c175b4fe06c Mon Sep 17 00:00:00 2001 From: Ruben Calvo Date: Thu, 28 Nov 2024 21:21:15 +0100 Subject: [PATCH] [ticket/17361] Remove fclose after write PHPBB-17361 --- phpBB/phpbb/attachment/upload.php | 5 ----- phpBB/phpbb/files/filespec_storage.php | 5 ----- phpBB/phpbb/storage/helper.php | 5 ----- 3 files changed, 15 deletions(-) diff --git a/phpBB/phpbb/attachment/upload.php b/phpBB/phpbb/attachment/upload.php index ba9ffa2526..f1ae0b8533 100644 --- a/phpBB/phpbb/attachment/upload.php +++ b/phpBB/phpbb/attachment/upload.php @@ -246,11 +246,6 @@ class upload $fp = fopen($destination, 'rb'); $this->storage->write($destination_name, $fp); - - if (is_resource($fp)) - { - fclose($fp); - } } else { diff --git a/phpBB/phpbb/files/filespec_storage.php b/phpBB/phpbb/files/filespec_storage.php index 5ded1e380b..f223976b9e 100644 --- a/phpBB/phpbb/files/filespec_storage.php +++ b/phpBB/phpbb/files/filespec_storage.php @@ -447,11 +447,6 @@ class filespec_storage $fp = fopen($this->filename, 'rb'); $storage->write($this->destination_file, $fp); - - if (is_resource($fp)) - { - fclose($fp); - } } catch (\phpbb\storage\exception\storage_exception $e) { diff --git a/phpBB/phpbb/storage/helper.php b/phpBB/phpbb/storage/helper.php index 66db2f4e8d..429e9b0a7c 100644 --- a/phpBB/phpbb/storage/helper.php +++ b/phpBB/phpbb/storage/helper.php @@ -195,11 +195,6 @@ class helper $stream = $current_adapter->read($file); $new_adapter->write($file, $stream); - - if (is_resource($stream)) - { - fclose($stream); - } }