filesender / filesender

FileSender server software
http://filesender.org
BSD 3-Clause "New" or "Revised" License
244 stars 136 forks source link

Fix undef HTTP_ACCEPT_LANGUAGE warning #1935

Closed peter- closed 10 months ago

peter- commented 10 months ago

Probably when trying out the FileSenderCli these warnings appeared in my web server error log:

Undefined array key "HTTP_ACCEPT_LANGUAGE" in /opt/filesender/classes/utils/Lang.class.php on line 265

The only call to Lang::getUserAcceptedLanguages() is from formatDate() in classes/utils/Utilities.class.php that then iterates over the result foreach ($al as $k => $v) so I guess returning an empty array in the pathological case makes sense.

github-actions[bot] commented 10 months ago

If there are selenium UI results for this code they will be at https://github.com/filesenderuici/filesender/commit/fd8aa3c84fa0bdb265ee4eb9c81ed3e463f0ee93