From a1f1fabe3a50eaab8586a9d45ada521cf2e67556 Mon Sep 17 00:00:00 2001 From: Justin York Date: Fri, 28 Sep 2012 12:42:13 -0600 Subject: [PATCH] Fix bug causing XML parsing exception to be thrown incorrectly --- src/Httpful/Handlers/XmlHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Httpful/Handlers/XmlHandler.php b/src/Httpful/Handlers/XmlHandler.php index 39e9444..4b11659 100644 --- a/src/Httpful/Handlers/XmlHandler.php +++ b/src/Httpful/Handlers/XmlHandler.php @@ -39,7 +39,7 @@ public function parse($body) if (empty($body)) return null; $parsed = simplexml_load_string($body, null, $this->libxml_opts, $this->namespace); - if (!$parsed) + if ($parsed === false) throw new \Exception("Unable to parse response as XML"); return $parsed; }