Browse Source

Use a relative path to the plugins file

And, if it's missing prevent repeatedly trying to find it during a
request
AD7six 11 years ago
parent
commit
053bb058fd
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/Core/Plugin.php

+ 2 - 1
src/Core/Plugin.php

@@ -187,8 +187,9 @@ class Plugin
             return;
         }
 
-        $vendorFile = ROOT . DS . 'vendor' . DS . 'cakephp-plugins.php';
+        $vendorFile = dirname(dirname(dirname(dirname(__DIR__)))) . DS . 'cakephp-plugins.php';
         if (!file_exists($vendorFile)) {
+            Configure::write(['plugins' => []]);
             return;
         }