Skip to content

Commit

Permalink
Fixes #8054
Browse files Browse the repository at this point in the history
Added a check first for the path to cakephp-plugins.php file will not go beyond the application in standalone one library.

The check for second one is made for framework.
  • Loading branch information
harikt committed Jan 17, 2016
1 parent 9a8b0ec commit 964b4be
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Core/Plugin.php
Expand Up @@ -185,11 +185,13 @@ protected static function _loadConfig()
if (Configure::check('plugins')) {
return;
}

$vendorFile = dirname(dirname(dirname(dirname(__DIR__)))) . DS . 'cakephp-plugins.php';
$vendorFile = dirname(dirname(__DIR__)) . DS . 'cakephp-plugins.php';
if (!file_exists($vendorFile)) {
Configure::write(['plugins' => []]);
return;
$vendorFile = dirname(dirname(dirname(dirname(__DIR__)))) . DS . 'cakephp-plugins.php';
if (!file_exists($vendorFile)) {
Configure::write(['plugins' => []]);
return;
}
}

$config = require $vendorFile;
Expand Down

0 comments on commit 964b4be

Please sign in to comment.