cakephp/cakephp — pull request #1298 by rchavik (2013-05-24 08:32:26+00:00)
Title: Fix: Incorrect model being used as Controller::$modelClass

We cannot be sure that Controller::$uses have not been iterated, so
reset the array to use the first value.

I have experienced this issue for a while in travis, eg: https://travis-ci.org/rchavik/croogo/jobs/7355091 but unable to reproduce the issue locally. A recent commit upstream 082257881 enable me to reproduce the issue consistently.

In a discussion in cakephp-dev, @AD7six commented: "depends on how merging occurs - is it current + plugin controller + app controller" that leads me to realize that the inheritance tree in Croogo may have caused this problem:

AppController extends Croogo.CroogoAppController
CroogoCroogoAppController extends Controller

This inheritance scheme is used to prepare for getting a plain cakephp application to easily extend Croogo functionality (slated for the next major release).