Fix built-in server for PHP > 5.4.1

This commit is contained in:
Albert Jessurum 2012-06-02 10:23:01 +02:00
parent 086ff48228
commit d982bac008

View File

@ -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';