summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKore Nordmann <mail@kore-nordmann.de>2010-01-22 19:26:02 +0100
committerKore Nordmann <mail@kore-nordmann.de>2010-01-22 19:26:02 +0100
commitbf803525d1699734a6e270ace15bfcd3e759f69c (patch)
treec6a6d091e2b70db3949046a04aa998379f1841c5
parentff548094420b7466bd28cf8ee79eabc436772530 (diff)
downloadtwircd-bf803525d1699734a6e270ace15bfcd3e759f69c.zip
twircd-bf803525d1699734a6e270ace15bfcd3e759f69c.tar.gz
twircd-bf803525d1699734a6e270ace15bfcd3e759f69c.tar.bz2
- Fixed: IRC message parser to work with empty parameter sets
-rw-r--r--src/classes/irc/message.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/classes/irc/message.php b/src/classes/irc/message.php
index 0e99074..ed385e5 100644
--- a/src/classes/irc/message.php
+++ b/src/classes/irc/message.php
@@ -110,7 +110,9 @@ class Message
}
$message->command = strtoupper( $match['command'] );
- $message->params = preg_split( '(\\s+)', trim( $match['params'] ) );
+
+ $match['params'] = trim( $match['params'] );
+ $message->params = empty( $match['params'] ) ? array() : preg_split( '(\\s+)', $match['params'] );
// The "text" should be considered as just another parameter
if ( isset( $match['text'] ) )