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:
@@ -246,8 +246,14 @@ class upload
|
||||
{
|
||||
// Move the thumbnail from temp folder to the storage
|
||||
$fp = fopen($destination, 'rb');
|
||||
|
||||
$this->storage->write_stream($destination_name, $fp);
|
||||
fclose($fp);
|
||||
|
||||
if (is_resource($fp))
|
||||
{
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
$this->storage->track_file($destination_name);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user