1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 16:52:41 +01:00

Merge pull request #165 from eyeofhell/master

Added compatibility with PHP 5.4+ built-in web server.
This commit is contained in:
Evan Priestley 2012-07-25 11:23:52 -07:00
commit 28618b345e

View file

@ -55,8 +55,14 @@ if (!$env) {
}
if (!isset($_REQUEST['__path__'])) {
phabricator_fatal_config_error(
"__path__ is not set. Your rewrite rules are not configured correctly.");
if (php_sapi_name() == 'cli-server') {
// Compatibility with PHP 5.4+ built-in web server.
$url = parse_url($_SERVER['REQUEST_URI']);
$_REQUEST['__path__'] = $url['path'];
} else {
phabricator_fatal_config_error(
"__path__ is not set. Your rewrite rules are not configured correctly.");
}
}
if (get_magic_quotes_gpc()) {