Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of git://github.com/Drarok/xmpphp

  • Loading branch information...
commit 28ab9981aeb099f865ad66325e8f6e37677a5e9d 2 parents b855049 + fe80cd6
@cweiske authored
Showing with 3 additions and 3 deletions.
  1. +2 −2 XMPPHP/Roster.php
  2. +1 −1  XMPPHP/XMLStream.php
View
4 XMPPHP/Roster.php
@@ -118,7 +118,7 @@ public function isContact($jid) {
* @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 @@ public function setPresence($presence, $priority, $show, $status) {
* @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
View
2  XMPPHP/XMLStream.php
@@ -263,7 +263,7 @@ public function addXPathHandler($xpath, $pointer, $obj = null) {
$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 {
Please sign in to comment.
Something went wrong with that request. Please try again.