Skip to content

Commit

Permalink
Fix built-in server for PHP > 5.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ajessu committed Jun 18, 2012
1 parent 086ff48 commit d982bac
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -18,12 +18,13 @@
* and pass it as a value to 'router' option of server:run command.
*
* @author: Michał Pipa <michal.pipa.xsolve@gmail.com>
* @author: Albert Jessurum <ajessu@gmail.com>
*/

if (isset($_SERVER['SCRIPT_FILENAME'])) {
if (is_file($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $_SERVER['REQUEST_URI'])) {
return false;
}

$_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.'app_dev.php';
$_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'app_dev.php';

require 'app_dev.php';

0 comments on commit d982bac

Please sign in to comment.