mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Clear cache of pluralized, singularized and tableize when set rules.
Signed-off-by: Mark Story <mark@mark-story.com>
This commit is contained in:
parent
9053291fe4
commit
bb0ff192f7
1 changed files with 5 additions and 0 deletions
|
@ -370,6 +370,11 @@ class Inflector {
|
||||||
$_this->{$var}[$rule] = array_merge($pattern, $_this->{$var}[$rule]);
|
$_this->{$var}[$rule] = array_merge($pattern, $_this->{$var}[$rule]);
|
||||||
}
|
}
|
||||||
unset($rules[$rule], $_this->{$var}['cache' . ucfirst($rule)], $_this->{$var}['merged'][$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']);
|
$_this->{$var}['rules'] = array_merge($rules, $_this->{$var}['rules']);
|
||||||
|
|
Loading…
Reference in a new issue