Skip to content

Commit

Permalink
Update CensorWords.php
Browse files Browse the repository at this point in the history
  • Loading branch information
TheInfernoX committed Jun 12, 2015
1 parent 845587b commit 5559522
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/CensorWords.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ public function censorString($string) {
// $anThis for <= PHP5.3
$newstring['clean'] = preg_replace_callback($badwords, function($matches) use (&$anThis,&$counter,&$match) {
$match[$counter++] = $matches[0];

// is $anThis->replacer a single char?
return (strlen($anThis->replacer) === 1)
? str_repeat($anThis->replacer, strlen($matches[0]))
Expand Down

0 comments on commit 5559522

Please sign in to comment.