summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Fastimage.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/Fastimage.php b/Fastimage.php
index 2f7f9b8..0d3b9a6 100644
--- a/Fastimage.php
+++ b/Fastimage.php
@@ -34,7 +34,13 @@ class FastImage
public function close()
{
- if ($this->handle) fclose($this->handle);
+ if ($this->handle)
+ {
+ fclose($this->handle);
+ $this->handle = null;
+ $this->type = null;
+ $this->str = null;
+ }
}
@@ -226,7 +232,7 @@ class FastImage
{
$size = unpack("C*", $str);
- return ($size[1] << 8) + $size[2];
+ return ($size[1] << 8) + $size[2];
}