From d815189acae7fd586d40d11ddae0eba3eadafc2d Mon Sep 17 00:00:00 2001 From: Piotr Date: Sun, 1 Jul 2012 02:18:07 +0200 Subject: [PATCH] Check if curl failed to get --- lib/XmppPrebind.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/XmppPrebind.php b/lib/XmppPrebind.php index d1fd8a2..1df19ed 100644 --- a/lib/XmppPrebind.php +++ b/lib/XmppPrebind.php @@ -453,6 +453,11 @@ protected function send($xml) { $response = curl_exec($ch); + // Check if curl failed to get response + if ($response === false) { + throw new XmppPrebindConnectionException("Cannot connect to service"); + } + curl_close($ch); if ($this->useGzip) {