Changeset 309

Show
Ignore:
Timestamp:
12/15/08 14:56:52 (5 years ago)
Author:
tobias382
Message:

Fixed an issue with parsing logic related to commands with arguments implemented using the Command plugin

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/2.0.0/Phergie/Plugin/Command.php

    r302 r309  
    5858 
    5959        // Separate the command and arguments 
    60         $args = preg_split('/\s+/', $msg, 2); 
    61         $cmd = strtolower(array_shift($args)); 
     60        $parsed = preg_split('/\s+/', $msg, 2); 
     61        $cmd = strtolower(array_shift($parsed)); 
     62        $args = count($parsed) ? array_shift($parsed) : ''; 
    6263        $method = 'onDo' . ucfirst($cmd);  
    6364