Browse files

Reverting change to regex greediness.

  • Loading branch information...
1 parent 6068549 commit a9952e90c13ede7fadbdbd71b2a06fc8b46be93d @jperras jperras committed Mar 18, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 cake/libs/inflector.php
View
2 cake/libs/inflector.php
@@ -288,7 +288,7 @@ function singularize($word) {
$_this->singular['cacheIrregular'] = '(?:' . join( '|', array_keys($irregular)) . ')';
}
- if (preg_match('/(.+?)\\b(' . $_this->singular['cacheIrregular'] . ')$/i', $word, $regs)) {
+ if (preg_match('/(.*)\\b(' . $_this->singular['cacheIrregular'] . ')$/i', $word, $regs)) {
$_this->singularized[$word] = $regs[1] . substr($word, 0, 1) . substr($irregular[strtolower($regs[2])], 1);
return $_this->singularized[$word];
}

0 comments on commit a9952e9

Please sign in to comment.