Skip to content
Permalink
Browse files

Update app/config

We should only use CakePHP's autoloader if the App namespace
cannot already be autoloaded.
  • Loading branch information...
markstory committed Nov 2, 2012
1 parent c0fcb71 commit 4607d78996ff1034b55d96f5bb86d3ae6c431634
Showing with 6 additions and 2 deletions.
  1. +6 −2 App/Config/app.php
@@ -15,7 +15,6 @@
namespace App\Config;
use Cake\Core\Configure;
use Cake\Core\ClassLoader;
/**
* CakePHP Debug Level:
@@ -106,10 +105,15 @@
/**
* Configure an autoloader for the App namespace.
*
* Use App\Controller\AppController as a test to see if composer
* support is being used.
*/
$loader = new ClassLoader($namespace, dirname(APP));
if (!class_exists('App\Controller\AppController')) {
$loader = new \Cake\Core\ClassLoader($namespace, dirname(APP));
$loader->register();
unset($loader, $namespace);
}
/**
* Define the FULL_BASE_URL used for link generation.

0 comments on commit 4607d78

Please sign in to comment.
You can’t perform that action at this time.