mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 05:18:52 +00:00
[ticket/15699] Check if is resource before close
PHPBB3-15699
This commit is contained in:
parent
9dc67e81ff
commit
8cb5ea8e20
1 changed files with 5 additions and 1 deletions
|
@ -189,7 +189,11 @@ class acp_storage
|
||||||
|
|
||||||
$stream = $current_adapter->read_stream($row['file_path']);
|
$stream = $current_adapter->read_stream($row['file_path']);
|
||||||
$new_adapter->write_stream($row['file_path'], $stream);
|
$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
|
$this->state['file_index'] = $row['file_id']; // Set last uploaded file
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue