Commit ab0ced4d authored by Brion Vibber's avatar Brion Vibber

Suppress notices in index.php running under lighttpd

parent e365e709
...@@ -210,12 +210,12 @@ function main() ...@@ -210,12 +210,12 @@ function main()
if ($_lighty_url['path'] != '/index.php' && $_lighty_url['path'] != '/') { if ($_lighty_url['path'] != '/index.php' && $_lighty_url['path'] != '/') {
$_lighty_path = preg_replace('/^'.preg_quote(common_config('site', 'path')).'\//', '', substr($_lighty_url['path'], 1)); $_lighty_path = preg_replace('/^'.preg_quote(common_config('site', 'path')).'\//', '', substr($_lighty_url['path'], 1));
$_SERVER['QUERY_STRING'] = 'p='.$_lighty_path; $_SERVER['QUERY_STRING'] = 'p='.$_lighty_path;
if ($_lighty_url['query']) { if (isset($_lighty_url['query']) && $_lighty_url['query'] != '') {
$_SERVER['QUERY_STRING'] .= '&'.$_lighty_url['query']; $_SERVER['QUERY_STRING'] .= '&'.$_lighty_url['query'];
} parse_str($_lighty_url['query'], $_lighty_query);
parse_str($_lighty_url['query'], $_lighty_query); foreach ($_lighty_query as $key => $val) {
foreach ($_lighty_query as $key => $val) { $_GET[$key] = $_REQUEST[$key] = $val;
$_GET[$key] = $_REQUEST[$key] = $val; }
} }
$_GET['p'] = $_REQUEST['p'] = $_lighty_path; $_GET['p'] = $_REQUEST['p'] = $_lighty_path;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment