pub / serci

Search the web with !keywords
git clone https://src.jayvii.de/pub/serci.git
Home | Log | Files | Exports | Refs | README | RSS

commit 564c2a5f6b4a8eb21babe5ed43d00de6c263f2f7
parent f68caec1641a801a3952443778364170fb6bf3b3
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Tue, 22 Apr 2025 19:04:51 +0200

fix: ensure HTTP_ACCEPT_LANGUAGE key exists

Diffstat:
Mconfig/config.php | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/config/config.php b/config/config.php @@ -1,5 +1,12 @@ <?php +/* Workarounds: + * HTTP_ACCEPT_LANGUAGE key in $_SERVER array does not exist in CLI mode. + */ +if (empty($_SERVER["HTTP_ACCEPT_LANGUAGE"])) { + $_SERVER["HTTP_ACCEPT_LANGUAGE"] = "en_GB"; +} + /* Define Search Engines * Insert "%s" for the search-query part * keywords are defined here as well. They may ONLY contain [A-Za-z0-9].