1 diff --git a/php/xmpp-prebind-php/lib/XmppPrebind.php b/php/xmpp-prebind-php/lib/XmppPrebind.php 2 index 0658eaa..2c68ea0 100644 3 --- a/php/xmpp-prebind-php/lib/XmppPrebind.php 4 +++ b/php/xmpp-prebind-php/lib/XmppPrebind.php 5 @@ -122,6 +122,9 @@ class XmppPrebind { 6 $this->password = $password; 7 8 $response = $this->sendInitialConnection(); 9 + if ($response == '') { 10 + throw new Exception('Empty response'); 11 + } 12 13 $body = self::getBodyFromXml($response); 14 $this->sid = $body->getAttribute('sid');