mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Prevent 'undefined' in php error log
This commit is contained in:
parent
50d7803c17
commit
212aeb6910
3 changed files with 7 additions and 3 deletions
|
|
@ -77,7 +77,7 @@ class DemoAccountPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function FilterSendMessage(&$oMessage)
|
public function FilterSendMessage($oMessage)
|
||||||
{
|
{
|
||||||
if ($oMessage && $this->isDemoAccount($this->Manager()->Actions()->GetAccount()))
|
if ($oMessage && $this->isDemoAccount($this->Manager()->Actions()->GetAccount()))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ class Utils
|
||||||
|
|
||||||
public static function Fingerprint() : string
|
public static function Fingerprint() : string
|
||||||
{
|
{
|
||||||
return \md5(empty($_SERVER['HTTP_USER_AGENT']) ? 'RainLoopFingerprint' : $_SERVER['HTTP_USER_AGENT']);
|
return \md5($_SERVER['HTTP_USER_AGENT'] ?: 'RainLoopFingerprint');
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function GetShortToken() : string
|
public static function GetShortToken() : string
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// PHP 8
|
// PHP 8
|
||||||
if (!\function_exists('str_contains')) {
|
if (!function_exists('str_contains')) {
|
||||||
function str_contains(string $haystack, string $needle) : bool
|
function str_contains(string $haystack, string $needle) : bool
|
||||||
{
|
{
|
||||||
return false !== \strpos($haystack, $needle);
|
return false !== \strpos($haystack, $needle);
|
||||||
|
|
@ -233,6 +233,10 @@
|
||||||
unset($sSalt, $sData, $sInstalled, $sPrivateDataFolderInternalName);
|
unset($sSalt, $sData, $sInstalled, $sPrivateDataFolderInternalName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($_SERVER['HTTP_USER_AGENT'])) {
|
||||||
|
$_SERVER['HTTP_USER_AGENT'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
// See https://github.com/kjdev/php-ext-brotli
|
// See https://github.com/kjdev/php-ext-brotli
|
||||||
if (!ini_get('zlib.output_compression') && !ini_get('brotli.output_compression')) {
|
if (!ini_get('zlib.output_compression') && !ini_get('brotli.output_compression')) {
|
||||||
if (defined('USE_GZIP')) {
|
if (defined('USE_GZIP')) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue