Assembla home | Assembla project page
 

Changeset 137

Show
Ignore:
Timestamp:
03/07/08 05:04:37 (9 months ago)
Author:
Slynderdale
Message:

Added support for non-breaking spaces aka hard spaces which the regex \s doesn't cover.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Phergie/Plugin/Abstract/Command.php

    r135 r137  
    5454        } 
    5555 
    56         if (preg_match('/^(\S+)(?:\s+(.*))?$/', $message, $match)) { 
     56        if (preg_match('/^(\S+)(?:[\s\0xa0]+(.*))?$/', $message, $match)) { 
    5757            $command = strtolower($match[1]); 
    5858            $params = isset ($match[2]) ? $match[2] : array(); 
     
    7272                    } 
    7373                } else { 
    74                     $params = preg_split('/\s+/', $params, $this->methods[$command][0]); 
     74                    $params = preg_split('/[\s\0xa0]+/', $params, $this->methods[$command][0]); 
    7575                    if ($this->methods[$command][1] <= count($params)) { 
    7676                        call_user_func_array(array($this, $method), $params);