Skip to content

Commit f11c6be

Browse files
authored
Merge pull request #11 from Genaker/Genaker-patch-1
Update FPC.php
2 parents 34b96ef + 4d0778a commit f11c6be

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

Mage/FPC/FPC.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,18 @@ public function fly()
4848
return false;
4949
}
5050

51+
5152
//For app folder
52-
$config = require __DIR__ . '/../../../../app/etc/env.php';
53-
//For Composer Folder ToDO: remove src from the composer to make app = to vendor
54-
// $config = require __DIR__ . '/../../../../../../app/etc/env.php';
53+
$config = @include __DIR__ . '/../../../../app/etc/env.php';
54+
if (!$config) {
55+
//For Composer Folder ToDO: remove src from the composer to make app = to vendor
56+
$config = @include __DIR__ . '/../../../../../../app/etc/env.php';
57+
}
58+
59+
if (!$config){
60+
// check include path
61+
header('FPC-ERROR: Config not found');
62+
}
5563

5664
//https://github.com/phpredis/phpredis/blob/develop/INSTALL.markdown
5765

0 commit comments

Comments
 (0)