env_string('DB_SERVER_PORT') returns '' when the variable is unset, and that
empty string is passed to mysqli::real_connect()'s ?int $port argument in
MysqlDbBackend::connect(), throwing a fatal TypeError under PHP 8 that breaks
every frontend page (HTTP 500) on socket / no-port setups. Regressed in the
web config redesign, which replaced getenv() (returns false -> int 0) with
env_string() (returns '').
Add an env_int() helper that maps both unset and empty to the default and
returns an int, and use it for the DB port.
|
||
|---|---|---|
| .. | ||
| config | ||
| entrypoints | ||
| scripts/snmptraps | ||