fossar / selfoss

multipurpose rss reader, live stream, mashup, aggregation web application
https://selfoss.aditu.de
GNU General Public License v3.0
2.36k stars 343 forks source link

cliupdate need to set $_SERVER[SERVER_PORT] #1238

Closed Infern1 closed 3 years ago

Infern1 commented 3 years ago

Since latest git pull I need to set SERVER_PORT for cliupdate.php to work

When running: %php cliupdate.php I get

[2020-12-22 14:00:00] selfoss.ERROR: Undefined index: SERVER_PORT

My fix: % SERVER_PORT=80 php cliupdate.php

I don't see why I need to define SERVER_PORT Tried to grep where it is defined, however can't seem to find it.

jtojnar commented 3 years ago

Thanks for reporting, bisected the error origin to 71ff3b5266c98a2677ed8292a5b51ababc290f7a.

FatFree framework ignores notices (errors with level E_NOTICE or E_USER_NOTICE) but we stopped ignoring them in that commit since well-written code should not really issue notices and PHP 8 turned many notices into warnings, which would not be ignored anyway.

Of course, since notices were previously ignored we would not know about such bad code so I tried various interactions with selfoss to root the notice-triggering code out. But such tests are always incomplete and I missed cliupdate.php :woman_shrugging:

jtojnar commented 3 years ago

Should be fixed now, thanks again for reporting.