]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Suppress notices in index.php running under lighttpd
authorBrion Vibber <brion@pobox.com>
Sat, 4 Sep 2010 00:57:23 +0000 (17:57 -0700)
committerBrion Vibber <brion@pobox.com>
Sat, 4 Sep 2010 00:57:23 +0000 (17:57 -0700)
index.php

index bf6cf7c00ca7eee261323185e61d41ad0c353f89..9501e2275da6d610b9263bcb5a9e911e721d64de 100644 (file)
--- 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;
         }