mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-02 06:51:08 +02:00
[ticket/17361] Remove fclose after write
PHPBB-17361
This commit is contained in:
@@ -246,11 +246,6 @@ class upload
|
|||||||
$fp = fopen($destination, 'rb');
|
$fp = fopen($destination, 'rb');
|
||||||
|
|
||||||
$this->storage->write($destination_name, $fp);
|
$this->storage->write($destination_name, $fp);
|
||||||
|
|
||||||
if (is_resource($fp))
|
|
||||||
{
|
|
||||||
fclose($fp);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -447,11 +447,6 @@ class filespec_storage
|
|||||||
$fp = fopen($this->filename, 'rb');
|
$fp = fopen($this->filename, 'rb');
|
||||||
|
|
||||||
$storage->write($this->destination_file, $fp);
|
$storage->write($this->destination_file, $fp);
|
||||||
|
|
||||||
if (is_resource($fp))
|
|
||||||
{
|
|
||||||
fclose($fp);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (\phpbb\storage\exception\storage_exception $e)
|
catch (\phpbb\storage\exception\storage_exception $e)
|
||||||
{
|
{
|
||||||
|
@@ -195,11 +195,6 @@ class helper
|
|||||||
|
|
||||||
$stream = $current_adapter->read($file);
|
$stream = $current_adapter->read($file);
|
||||||
$new_adapter->write($file, $stream);
|
$new_adapter->write($file, $stream);
|
||||||
|
|
||||||
if (is_resource($stream))
|
|
||||||
{
|
|
||||||
fclose($stream);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user