Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed issues with parsing arguments of incoming events in Phergie_Dri…

…ver_Streams->getEvent()
  • Loading branch information...
commit 2b611f42964f2aaceb7c5b341c6dbc6add9af126 1 parent 7a08a4b
@elazar elazar authored
Showing with 3 additions and 4 deletions.
  1. +2 −2 Phergie/Driver/Streams.php
  2. +1 −2  Phergie/Event/Request.php
View
4 Phergie/Driver/Streams.php
@@ -216,7 +216,7 @@ public function getTimeout()
*/
protected function parseArguments($args, $count = -1)
{
- return preg_split('/ :?/S', $args, $count);
+ return preg_split('/ :?/S', ltrim($args, ':'), $count);
}
/**
@@ -268,6 +268,7 @@ public function getEvent()
case 'ping':
case 'pong':
case 'error':
+ case 'part':
$args = array_filter(array(ltrim($args, ':')));
break;
@@ -301,7 +302,6 @@ public function getEvent()
break;
case 'topic':
- case 'part':
case 'invite':
case 'join':
$args = $this->parseArguments($args, 2);
View
3  Phergie/Event/Request.php
@@ -220,8 +220,7 @@ class Phergie_Event_Request
),
self::TYPE_PART => array(
- 'channel' => 0,
- 'message' => 1
+ 'channel' => 0
),
self::TYPE_INVITE => array(
Please sign in to comment.
Something went wrong with that request. Please try again.