Running the entry point directly from the CLI — e.g. for the cron feed-update path guarded by PHP_SAPI === 'cli' in server/index.php — fatals before reaching that code, because three $_SERVER keys that only exist under a web server are accessed unconditionally:
server/index.php:5 — $_SERVER['REQUEST_URI']
server/_inc.php:46 — $_SERVER['SERVER_PORT'] (in the HTTP_SCHEME default)
server/_inc.php:76-77 — $_SERVER['SERVER_NAME'] / SERVER_PORT (building BASE_URL)
On PHP 8+ these produce Undefined array key warnings and a parse_url(null) deprecation, and the error handler aborts the run.
Reproduce
Warning: Undefined array key "REQUEST_URI" in server/index.php on line 5
Deprecated: parse_url(): Passing null to parameter #1 ($url) of type string is deprecated in server/index.php on line 5
/!\ PHP error
Warning: Undefined array key "SERVER_PORT"
Expected
The CLI path should run (it's intended — it calls updateAllFeeds()), not fatal on missing web-server superglobals.
Running the entry point directly from the CLI — e.g. for the cron feed-update path guarded by
PHP_SAPI === 'cli'inserver/index.php— fatals before reaching that code, because three$_SERVERkeys that only exist under a web server are accessed unconditionally:server/index.php:5—$_SERVER['REQUEST_URI']server/_inc.php:46—$_SERVER['SERVER_PORT'](in theHTTP_SCHEMEdefault)server/_inc.php:76-77—$_SERVER['SERVER_NAME']/SERVER_PORT(buildingBASE_URL)On PHP 8+ these produce
Undefined array keywarnings and aparse_url(null)deprecation, and the error handler aborts the run.Reproduce
Expected
The CLI path should run (it's intended — it calls
updateAllFeeds()), not fatal on missing web-server superglobals.