1 | <?php |
||
2 | |||
3 | /* |
||
4 | * @copyright 2014 Mautic, NP |
||
5 | * @author Mautic |
||
6 | * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html |
||
7 | */ |
||
8 | define('MAUTIC_ROOT_DIR', __DIR__); |
||
9 | |||
10 | // Fix for hosts that do not have date.timezone set, it will be reset based on users settings |
||
11 | date_default_timezone_set('UTC'); |
||
12 | |||
13 | require_once __DIR__.'/vendor/autoload.php'; |
||
14 | |||
15 | use Mautic\CoreBundle\ErrorHandler\ErrorHandler; |
||
16 | use Mautic\Middleware\MiddlewareBuilder; |
||
17 | use function Stack\run; |
||
18 | |||
19 | if (extension_loaded('apcu') && in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1', '172.17.0.1'])) { |
||
20 | @apcu_clear_cache(); |
||
0 ignored issues
–
show
|
|||
21 | } |
||
22 | |||
23 | ErrorHandler::register('dev'); |
||
24 | |||
25 | run((new MiddlewareBuilder(new AppKernel('dev', true)))->resolve()); |
||
26 |
If you suppress an error, we recommend checking for the error condition explicitly: