Second parameter of ClassRegistry::init() is a boolean, not a string

This commit is contained in:
Simon Males 2013-04-22 11:46:23 +08:00
parent 4b1283f002
commit 77feac9ef6

View file

@ -539,7 +539,7 @@ class TranslateBehavior extends ModelBehavior {
$className = $Model->translateModel;
}
$this->runtime[$Model->alias]['model'] = ClassRegistry::init($className, 'Model');
$this->runtime[$Model->alias]['model'] = ClassRegistry::init($className);
}
if (!empty($Model->translateTable) && $Model->translateTable !== $this->runtime[$Model->alias]['model']->useTable) {
$this->runtime[$Model->alias]['model']->setSource($Model->translateTable);