summaryrefslogtreecommitdiffstats
path: root/Fastimage.php
diff options
context:
space:
mode:
authorTom Moor <tom.moor@gmail.com>2015-05-16 11:13:43 -0700
committerTom Moor <tom.moor@gmail.com>2015-05-16 11:13:43 -0700
commit7bf53fcfebb5bc04b78a8cf23862778256de2241 (patch)
treed39767c2988b791b51885399e16dc84a113bf931 /Fastimage.php
parentc721859ea6e8feebb30da3839d1e170ddf1e8a41 (diff)
parent428e426f5b180d6b791c5a35c20841cffc91e822 (diff)
downloadfastimage-master.zip
fastimage-master.tar.gz
fastimage-master.tar.bz2
Merge pull request #8 from jdreesen/patch-1HEADorigin/masterorigin/HEADmaster
Reset $type and $str on close() to enable subsequent uses of load()
Diffstat (limited to 'Fastimage.php')
-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];
}