1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

[ticket/15699] Check if is resource before close

PHPBB3-15699
This commit is contained in:
Rubén Calvo
2018-08-01 21:04:55 +02:00
committed by Ruben Calvo
parent 9dc67e81ff
commit 8cb5ea8e20

View File

@@ -189,7 +189,11 @@ class acp_storage
$stream = $current_adapter->read_stream($row['file_path']);
$new_adapter->write_stream($row['file_path'], $stream);
fclose($stream);
if (is_resource($stream))
{
fclose($stream);
}
$this->state['file_index'] = $row['file_id']; // Set last uploaded file
}