Permalink
Browse files

Fix built-in server for PHP > 5.4.1

  • Loading branch information...
1 parent 086ff48 commit d982bac008392654047c55b799ccc8af700a4f75 @ajessu committed Jun 2, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/Symfony/Bundle/FrameworkBundle/Resources/config/router.php
@@ -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.