From 28cff8a0df3af23f7acf01840da43c098c779313 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 1 Dec 2021 23:24:39 +0100 Subject: Fix some PHP 8.1 warnings (#4012) * Fix some PHP 8.1 warnings The proper fix will have to wait till be drop PHP7. #fix https://github.com/FreshRSS/FreshRSS/issues/4010 * Another PHP8.1 fix --- lib/Minz/Request.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Minz/Request.php') diff --git a/lib/Minz/Request.php b/lib/Minz/Request.php index 232479191..08a5e9053 100644 --- a/lib/Minz/Request.php +++ b/lib/Minz/Request.php @@ -415,7 +415,7 @@ class Minz_Request { * @return string */ private static function extractContentType() { - return strtolower(trim(static::getHeader('CONTENT_TYPE'))); + return strtolower(trim(static::getHeader('CONTENT_TYPE', ''))); } /** @@ -454,7 +454,7 @@ class Minz_Request { * @return array */ public static function getPreferredLanguages() { - if (preg_match_all('/(^|,)\s*(?P[^;,]+)/', static::getHeader('HTTP_ACCEPT_LANGUAGE'), $matches)) { + if (preg_match_all('/(^|,)\s*(?P[^;,]+)/', static::getHeader('HTTP_ACCEPT_LANGUAGE', ''), $matches)) { return $matches['lang']; } return array('en'); -- cgit v1.2.3