Fixed stream handling for too big files
This commit is contained in:
parent
8e39f08cf5
commit
73a64034b0
1 changed files with 0 additions and 2 deletions
|
@ -41,8 +41,6 @@ class TransferHelper
|
||||||
fflush($dstHandle);
|
fflush($dstHandle);
|
||||||
if ($maxBytes !== null and ftell($dstHandle) > $maxBytes)
|
if ($maxBytes !== null and ftell($dstHandle) > $maxBytes)
|
||||||
{
|
{
|
||||||
fclose($srcHandle);
|
|
||||||
fclose($dstHandle);
|
|
||||||
throw new SimpleException(
|
throw new SimpleException(
|
||||||
'File is too big (maximum size: %s)',
|
'File is too big (maximum size: %s)',
|
||||||
TextHelper::useBytesUnits($maxBytes));
|
TextHelper::useBytesUnits($maxBytes));
|
||||||
|
|
Loading…
Reference in a new issue