Skip to content

Commit a9952e9

Browse files
committed
Reverting change to regex greediness.
1 parent 6068549 commit a9952e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cake/libs/inflector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ function singularize($word) {
288288
$_this->singular['cacheIrregular'] = '(?:' . join( '|', array_keys($irregular)) . ')';
289289
}
290290

291-
if (preg_match('/(.+?)\\b(' . $_this->singular['cacheIrregular'] . ')$/i', $word, $regs)) {
291+
if (preg_match('/(.*)\\b(' . $_this->singular['cacheIrregular'] . ')$/i', $word, $regs)) {
292292
$_this->singularized[$word] = $regs[1] . substr($word, 0, 1) . substr($irregular[strtolower($regs[2])], 1);
293293
return $_this->singularized[$word];
294294
}

0 commit comments

Comments
 (0)