mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/15342] Check if is resource before close it
PHPBB3-15342
This commit is contained in:
@@ -445,8 +445,14 @@ class filespec_storage
|
||||
try
|
||||
{
|
||||
$fp = fopen($this->filename, 'rb');
|
||||
|
||||
$storage->write_stream($this->destination_file, $fp);
|
||||
fclose($fp);
|
||||
|
||||
if (is_resource($fp))
|
||||
{
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
$storage->track_file($this->destination_file);
|
||||
}
|
||||
catch (\phpbb\storage\exception\exception $e)
|
||||
|
Reference in New Issue
Block a user