fclose($file) exception.

It happens that fclose trigger an Exception because the resource is already closed.
After investigation, it seems that the $file get closed in the putObject function (l. 274) when the garbage collector clean the memory.
The change fix this issue.

Here is the related issue on the aws sdk repo: 
https://github.com/aws/aws-sdk-php/issues/929
This commit is contained in:
Florian DE LA COMBLE 2019-07-27 16:42:35 +02:00 committed by GitHub
parent ad0726e41e
commit 08c95b254a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -289,7 +289,7 @@ class SpacesConnect {
catch (\Exception $e) {
$this->HandleAWSException($e);
} finally {
if ($is_file) {
if (is_resource($file)) {
fclose($file);
}
}