Browse files

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
  • Loading branch information...
1 parent 57106b1 commit 3f1edf7b081a300e41f84ec3cee6ad6577d28189 @timglabisch timglabisch committed Jul 23, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 cake/libs/configure.php
@@ -1064,8 +1064,8 @@ function __load($file) {
if (file_exists($file)) {
if (!$this->return) {
- require($file);
$this->__loaded[$file] = true;
+ require($file);
return true;

0 comments on commit 3f1edf7

Please sign in to comment.