Assembla home | Assembla project page
 
Show
Ignore:
Timestamp:
09/17/08 00:24:34 (2 months ago)
Author:
tobias382
Message:

Adds error suppression to the Sed plugin when invalid regular expressions are specified

Files:

Legend:

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

    r278 r286  
    119119                if (($this->timeLimit <= 0 || isset($tstamp) && ((time() - $this->timeLimit) < $tstamp)) && 
    120120                    !empty($subject) && !preg_match($regex, $subject, $m)) { 
    121                     $output = trim(preg_replace('/' . $pattern . '/' . $flags, $replacement, $subject, $limit)); 
     121                    $output = trim(@preg_replace('/' . $pattern . '/' . $flags, $replacement, $subject, $limit)); 
    122122                    if (!empty($output) && $subject != $output) { 
    123123                        $this->doPrivmsg($source,