Skip to content

Commit

Permalink
Fix: Do not load cakephp-plugins from outside of ROOT
Browse files Browse the repository at this point in the history
Running tests on a vendor installed cakephp will cause plugins from its
app to be loaded.
  • Loading branch information
rchavik committed Sep 14, 2017
1 parent 8262b4d commit 1597e6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Core/Plugin.php
Expand Up @@ -189,7 +189,7 @@ protected static function _loadConfig()
$vendorFile = dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'cakephp-plugins.php'; $vendorFile = dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'cakephp-plugins.php';
if (!file_exists($vendorFile)) { if (!file_exists($vendorFile)) {
$vendorFile = dirname(dirname(dirname(dirname(__DIR__)))) . DIRECTORY_SEPARATOR . 'cakephp-plugins.php'; $vendorFile = dirname(dirname(dirname(dirname(__DIR__)))) . DIRECTORY_SEPARATOR . 'cakephp-plugins.php';
if (!file_exists($vendorFile)) { if (strpos(ROOT, $vendorFile) === false || !file_exists($vendorFile)) {
Configure::write(['plugins' => []]); Configure::write(['plugins' => []]);


return; return;
Expand Down

0 comments on commit 1597e6f

Please sign in to comment.