Skip to content

Commit

Permalink
We don't have 'legacy.php' anymore, so no use in keeping __FILE__ aro…
Browse files Browse the repository at this point in the history
…und.
  • Loading branch information
bobdenotter committed Oct 17, 2016
1 parent b02e9a1 commit e838b6e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Bolt\Exception\BootException;

if (version_compare(PHP_VERSION, '5.5.9', '<')) {
require dirname(dirname(__FILE__)) . '/src/Exception/BootException.php';
require dirname(__DIR__) . '/src/Exception/BootException.php';

BootException::earlyExceptionVersion();
}
Expand All @@ -16,4 +16,4 @@
}
}

return require dirname(__FILE__) . '/bootstrap.php';
return require __DIR__ . '/bootstrap.php';
8 changes: 3 additions & 5 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<?php

/*
* `dirname(__FILE__)` is intentional to support PHP 5.2 until legacy.php can be shown.
*/
/** @var Silex\Application|false $app */
$app = require dirname(__FILE__) . '/app/web.php';
$app = require __DIR__ . '/app/web.php';

// If web.php returns false, meaning the path is a file, pass it along.
// If we're running PHP's built-in webserver, `web.php` returns `false`,
// meaning the path is a file. If so, we pass it along.
if ($app === false) {
return false;
}
Expand Down

0 comments on commit e838b6e

Please sign in to comment.