diff --git a/spaces.php b/spaces.php index 8494bf4..f178eb7 100644 --- a/spaces.php +++ b/spaces.php @@ -289,7 +289,7 @@ class SpacesConnect { catch (\Exception $e) { $this->HandleAWSException($e); } finally { - if ($is_file) { + if (is_resource($file)) { fclose($file); } }