Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Clear cache of pluralized, singularized and tableize when set rules.

Signed-off-by: Mark Story <mark@mark-story.com>
  • Loading branch information...
commit bb0ff192f7e473b0b671facd983401b86ea40a92 1 parent 9053291
@jrbasso jrbasso authored markstory committed
Showing with 5 additions and 0 deletions.
  1. +5 −0 cake/libs/inflector.php
View
5 cake/libs/inflector.php
@@ -370,6 +370,11 @@ function rules($type, $rules, $reset = false) {
$_this->{$var}[$rule] = array_merge($pattern, $_this->{$var}[$rule]);
}
unset($rules[$rule], $_this->{$var}['cache' . ucfirst($rule)], $_this->{$var}['merged'][$rule]);
+ if ($type === 'plural') {
+ $_this->_pluralized = $_this->_tableize = array();
+ } elseif ($type === 'singular') {
+ $_this->_singularized = array();
+ }
}
}
$_this->{$var}['rules'] = array_merge($rules, $_this->{$var}['rules']);
Please sign in to comment.
Something went wrong with that request. Please try again.