Naughty fix for extlib XMPPHP (PHP7)

I shouldn't fix extlibs, but here goes anyway. I will see if there's
an upstream library we can track which has fixed this themselves.
This commit is contained in:
Mikael Nordfeldth
2016-04-26 02:41:04 +02:00
parent 58274c99d4
commit af28160679
2 changed files with 7 additions and 7 deletions

View File

@@ -118,7 +118,7 @@ class Roster {
* @param string $status
*/
public function setPresence($presence, $priority, $show, $status) {
list($jid, $resource) = split("/", $presence);
list($jid, $resource) = explode("/", $presence);
if ($show != 'unavailable') {
if (!$this->isContact($jid)) {
$this->addContact($jid, 'not-in-roster');
@@ -137,7 +137,7 @@ class Roster {
* @param string $jid
*/
public function getPresence($jid) {
$split = split("/", $jid);
$split = explode("/", $jid);
$jid = $split[0];
if($this->isContact($jid)) {
$current = array('resource' => '', 'active' => '', 'priority' => -129, 'show' => '', 'status' => ''); //Priorities can only be -128 = 127