Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3 from janmuennich/master
Browse files Browse the repository at this point in the history
Fix detection of Auth mechanisms.
  • Loading branch information
Piotr committed Oct 13, 2014
2 parents ea46d9c + f698f07 commit 770214e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions lib/XmppPrebind.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,8 @@ public function connect($username, $password) {
$this->sid = $body->getAttribute('sid');
$this->debug($this->sid, 'sid');

$child = $body->firstChild->firstChild;
if (is_object($child)) {
$mechanisms = $child->getElementsByTagName('mechanism');
} else {
throw new Exception('Invalid response');
}

$mechanisms = $body->getElementsByTagName('mechanism');

foreach ($mechanisms as $value) {
$this->mechanisms[] = $value->nodeValue;
}
Expand Down

0 comments on commit 770214e

Please sign in to comment.