Skip to content

Commit

Permalink
Merge pull request #3 from ViPErCZ/master
Browse files Browse the repository at this point in the history
Update XMLStream.php
  • Loading branch information
ViPErCZ authored Jul 24, 2017
2 parents ff558b8 + dff5f9d commit b8f1143
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions XMPPHP/XMLStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ public function processTime($timeout=NULL) {
*
* @param string|array $event
* @param integer $timeout
* @return string
* @return array
*/
public function processUntil($event, $timeout=-1) {
$start = time();
Expand Down Expand Up @@ -568,7 +568,8 @@ public function endXML($parser, $name) {
if ($handler[2] === null)
$handler[2] = $this;
$this->log->log("Calling {$handler[1]}", XMPPHP_Log::LEVEL_DEBUG);
$handler[2]->$handler[1]($this->xmlobj[2]);
$name = $handler[1];
$handler[2]->$name($this->xmlobj[2]);
}
}
}
Expand All @@ -583,14 +584,16 @@ public function endXML($parser, $name) {
if ($handler[3] === null)
$handler[3] = $this;
$this->log->log("Calling {$handler[2]}", XMPPHP_Log::LEVEL_DEBUG);
$handler[3]->$handler[2]($this->xmlobj[2]);
$name = $handler[2];
$handler[3]->$name($this->xmlobj[2]);
}
}
foreach ($this->idhandlers as $id => $handler) {
if (array_key_exists('id', $this->xmlobj[2]->attrs) and $this->xmlobj[2]->attrs['id'] == $id) {
if ($handler[1] === null)
$handler[1] = $this;
$handler[1]->$handler[0]($this->xmlobj[2]);
$name = $handler[0];
$handler[1]->$name($this->xmlobj[2]);
#id handlers are only used once
unset($this->idhandlers[$id]);
break;
Expand Down

0 comments on commit b8f1143

Please sign in to comment.