From fe80cd6f487100ed8bd3c2dde1331c44c77c52b2 Mon Sep 17 00:00:00 2001 From: Mat Gadd Date: Thu, 25 Feb 2010 15:51:04 +0000 Subject: [PATCH] Replace usage of deprecated split() function with explode(). --- XMPPHP/Roster.php | 4 ++-- XMPPHP/XMLStream.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/XMPPHP/Roster.php b/XMPPHP/Roster.php index 2e459e2..ccbf6c8 100644 --- a/XMPPHP/Roster.php +++ b/XMPPHP/Roster.php @@ -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, 2); 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, 2); $jid = $split[0]; if($this->isContact($jid)) { $current = array('resource' => '', 'active' => '', 'priority' => -129, 'show' => '', 'status' => ''); //Priorities can only be -128 = 127 diff --git a/XMPPHP/XMLStream.php b/XMPPHP/XMLStream.php index 63f3b4f..3e6e241 100644 --- a/XMPPHP/XMLStream.php +++ b/XMPPHP/XMLStream.php @@ -263,7 +263,7 @@ class XMPPHP_XMLStream { $ns_tags = array($xpath); } foreach($ns_tags as $ns_tag) { - list($l, $r) = split("}", $ns_tag); + list($l, $r) = explode('}', $ns_tag); if ($r != null) { $xpart = array(substr($l, 1), $r); } else {