summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-09-03 17:57:23 -0700
committerBrion Vibber <brion@pobox.com>2010-09-03 17:57:23 -0700
commitab0ced4dfd22ae153c835a90cab36a037e6a6b72 (patch)
tree2f8b4b0ee6ecae3839e13d4915666ac9005d8cd4 /index.php
parente365e709c5bab7d593ee1cde26c8bcfdddcc6780 (diff)
Suppress notices in index.php running under lighttpd
Diffstat (limited to 'index.php')
-rw-r--r--index.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/index.php b/index.php
index bf6cf7c00..9501e2275 100644
--- a/index.php
+++ b/index.php
@@ -210,12 +210,12 @@ function main()
if ($_lighty_url['path'] != '/index.php' && $_lighty_url['path'] != '/') {
$_lighty_path = preg_replace('/^'.preg_quote(common_config('site', 'path')).'\//', '', substr($_lighty_url['path'], 1));
$_SERVER['QUERY_STRING'] = 'p='.$_lighty_path;
- if ($_lighty_url['query']) {
+ if (isset($_lighty_url['query']) && $_lighty_url['query'] != '') {
$_SERVER['QUERY_STRING'] .= '&'.$_lighty_url['query'];
- }
- parse_str($_lighty_url['query'], $_lighty_query);
- foreach ($_lighty_query as $key => $val) {
- $_GET[$key] = $_REQUEST[$key] = $val;
+ parse_str($_lighty_url['query'], $_lighty_query);
+ foreach ($_lighty_query as $key => $val) {
+ $_GET[$key] = $_REQUEST[$key] = $val;
+ }
}
$_GET['p'] = $_REQUEST['p'] = $_lighty_path;
}