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

[ticket/15305] Throw exception if stream_copy_to_stream() fail

PHPBB3-15305
This commit is contained in:
Rubén Calvo
2017-08-08 11:40:16 +02:00
parent 98ad1e4971
commit d89df35959
2 changed files with 5 additions and 1 deletions

View File

@@ -229,6 +229,9 @@ class local implements adapter_interface, stream_interface
throw new exception('STORAGE_CANNOT_CREATE_FILE', $path);
}
stream_copy_to_stream($resource, $stream);
if (stream_copy_to_stream($resource, $stream) === false)
{
throw new exception('STORAGE_CANNOT_COPY_RESOURCE');
}
}
}