1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/15692] Check if argument is a valid resource

PHPBB3-15692
This commit is contained in:
Rubén Calvo
2018-08-07 00:18:25 +02:00
parent 071d5fe997
commit 5fbe929a1d
2 changed files with 6 additions and 0 deletions

View File

@@ -271,6 +271,11 @@ class storage
throw new exception('STORAGE_FILE_EXISTS', $path);
}
if (!is_resource($resource))
{
throw new exception('STORAGE_INVALID_RESOURCE');
}
$adapter = $this->get_adapter();
if ($adapter instanceof stream_interface)