Skip to content

Commit

Permalink
Simplifying code
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Apr 27, 2011
1 parent 84538ac commit 228230e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/Controller/Controller.php
Expand Up @@ -521,8 +521,8 @@ public function constructClasses() {
$this->__mergeVars();
$this->Components->init($this);
if ($this->uses) {
$this->uses = $uses = is_array($this->uses) ? $this->uses : array($this->uses);
list(, $this->modelClass) = pluginSplit($uses[0]);
$this->uses = (array) $this->uses;
list(, $this->modelClass) = pluginSplit(current($this->uses));
}
return true;
}
Expand Down

0 comments on commit 228230e

Please sign in to comment.