Make it work with php7

This commit is contained in:
steckbrief 2017-01-09 20:43:17 +01:00
parent 4743fe3c60
commit abc4e994f1

View file

@ -617,7 +617,7 @@ class XMLStream {
if ($searchxml !== null) {
if($handler[2] === null) $handler[2] = $this;
$this->log->log("Calling {$handler[1]}", XMPPLog::LEVEL_DEBUG);
$handler[2]->$handler[1]($this->xmlobj[2]);
call_user_func([$handler[2], $handler[1]], $this->xmlobj[2]);
}
}
}
@ -631,13 +631,13 @@ class XMLStream {
if($searchxml !== null and $searchxml->name == $handler[0] and ($searchxml->ns == $handler[1] or (!$handler[1] and $searchxml->ns == $this->default_ns))) {
if($handler[3] === null) $handler[3] = $this;
$this->log->log("Calling {$handler[2]}", XMPPLog::LEVEL_DEBUG);
$handler[3]->$handler[2]($this->xmlobj[2]);
call_user_func([$handler[3], $handler[2]], $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]);
call_user_func([$handler[1], $handler[0]], $this->xmlobj[2]);
#id handlers are only used once
unset($this->idhandlers[$id]);
break;
@ -691,7 +691,7 @@ class XMLStream {
if($handler[2] === null) {
$handler[2] = $this;
}
$handler[2]->$handler[1]($payload);
call_user_func([$handler[2], $handler[1]], $payload);
}
}
foreach($this->until as $key => $until) {