Merge pull request #10069 from berarma/server-fix

2.x: Built-in server doesn't accept query string parameters for the base path
This commit is contained in:
Mark Story 2017-01-22 09:31:48 -05:00 committed by GitHub
commit 0c1bda2046

View file

@ -82,7 +82,7 @@ if (!defined('WWW_ROOT')) {
// For the built-in server // For the built-in server
if (PHP_SAPI === 'cli-server') { if (PHP_SAPI === 'cli-server') {
if ($_SERVER['REQUEST_URI'] !== '/' && file_exists(WWW_ROOT . $_SERVER['PHP_SELF'])) { if ($_SERVER['PHP_SELF'] !== '/' . basename(__FILE__) && file_exists(WWW_ROOT . $_SERVER['PHP_SELF'])) {
return false; return false;
} }
$_SERVER['PHP_SELF'] = '/' . basename(__FILE__); $_SERVER['PHP_SELF'] = '/' . basename(__FILE__);