Navigation Menu

Skip to content

Commit

Permalink
Fix Inflector::singularize bug with custom irregular singular rule no…
Browse files Browse the repository at this point in the history
…t being parsed.
  • Loading branch information
jperras committed Mar 22, 2009
1 parent a9952e9 commit 6c1c6ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cake/libs/inflector.php
Expand Up @@ -281,7 +281,7 @@ function singularize($word) {

extract($_this->singular);
$uninflected = array_merge($uninflected, $_this->uninflected);
$irregular = array_flip($_this->plural['irregular']);
$irregular = array_merge($irregular, array_flip($_this->plural['irregular']));

if (!isset($_this->singular['cacheUninflected']) || !isset($_this->singular['cacheIrregular'])) {
$_this->singular['cacheUninflected'] = '(?:' . join( '|', $uninflected) . ')';
Expand Down

0 comments on commit 6c1c6ad

Please sign in to comment.