Bugfix: Trying to access array offset on value of type null in /app/libraries/MailSo/Sieve/ManageSieveClient.php on line 223

Bugfix: Return value of RainLoop\UserAgent::getHeader() must be of the type string, null returned in /app/libraries/RainLoop/UserAgent.php on line 156
Bugfix: file_exists() also checks for directory, should use is_file
Bugfix: accidentally removed <div id="rl-check"></div>
This commit is contained in:
djmaze 2020-07-31 16:13:38 +02:00
parent 97bf6f70b8
commit 45fa12be42
6 changed files with 48 additions and 36 deletions

View file

@ -150,8 +150,10 @@ class UserAgent
public static function getHeader() : string
{
static $agent;
if (null === $agent && isset($_SERVER['HTTP_USER_AGENT'])) {
$agent = strtolower(substr($_SERVER['HTTP_USER_AGENT'], 0, 500));
if (null === $agent) {
$agent = isset($_SERVER['HTTP_USER_AGENT'])
? strtolower(substr($_SERVER['HTTP_USER_AGENT'], 0, 500))
: '';
}
return $agent;
}