cakephp/cakephp — pull request #732 by timglabisch (2012-07-23 13:53:24+00:00)
Title: at first set file loaded, than load file.

i had trouble with "Cannot redeclare class DboSource". The Problem is that the file is loaded and may the included file also requires that class. In this case the __load function recalls and reload the same file because the loaded flag isnt set.

try include *\cake\libs\model\datasources\dbo_source.php
try include *\cake\libs\model\datasources\dbo_source.php
finsed include *\cake\libs\model\datasources\dbo_source.php
PHP Fatal error: Cannot redeclare class DboSource in *\cake\libs\model\datasources\dbo_source.php