at first set file loaded, than load file. #732

Merged
merged 1 commit into from Jul 23, 2012

Conversation

Projects
None yet
2 participants
@timglabisch

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

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

markstory added a commit that referenced this pull request Jul 23, 2012

Merge pull request #732 from timglabisch/patch-1
Fix issues with circular dependencies.

@markstory markstory merged commit acd25c3 into cakephp:1.3 Jul 23, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment