mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Reverting change to regex greediness.
This commit is contained in:
parent
6068549418
commit
a9952e90c1
1 changed files with 1 additions and 1 deletions
|
@ -288,7 +288,7 @@ class Inflector extends Object {
|
||||||
$_this->singular['cacheIrregular'] = '(?:' . join( '|', array_keys($irregular)) . ')';
|
$_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);
|
$_this->singularized[$word] = $regs[1] . substr($word, 0, 1) . substr($irregular[strtolower($regs[2])], 1);
|
||||||
return $_this->singularized[$word];
|
return $_this->singularized[$word];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue