Fixing issue where ClassRegistry would not be loaded when using Models

in shells.  Fixes #1417
This commit is contained in:
mark_story 2010-12-29 10:44:15 -05:00
parent b6b4f4a3df
commit 2e0f2c75f4

View file

@ -218,6 +218,7 @@ class Shell extends Object {
if ($this->uses === null || $this->uses === false) {
return;
}
App::import('Core', 'ClassRegistry');
if ($this->uses !== true && !empty($this->uses)) {
$uses = is_array($this->uses) ? $this->uses : array($this->uses);