panicsteve / w2wiki

A web-based, wiki-like notepad that you host yourself
MIT License
131 stars 27 forks source link

Warning spam #18

Open za3k opened 2 years ago

za3k commented 2 years ago

I get warnings printed to my nginx error log on every page load. The page loads fine, it's just nice to remove this to make logs more readable.

2022/04/21 13:56:37 [error] 15114#15114: *324651 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined variable: text in /var/www/lexicon1/index.php on line 490" while reading response header from upstream, client: ::ffff:174.101.140.242, server: lexicon.za3k.com, request: "GET /index.php/LexiconOne HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.3-fpm.sock:", host: "lexicon.za3k.com"
za3k commented 2 years ago

Actually, this is only when a page was missing -- the PATH_INFO bug was just masking what was happening

panicsteve commented 2 years ago

$text = ""; somewhere near the very beginning of the script should fix this.