mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-05 15:37:03 +03:00
More PHP7 strict typing
This commit is contained in:
parent
3a7ec4ecb0
commit
e8d38a6870
6 changed files with 13 additions and 30 deletions
|
|
@ -218,7 +218,7 @@ class Service
|
|||
}
|
||||
|
||||
$sResult .= '<!--';
|
||||
$sResult .= '[time:'.\substr(\microtime(true) - APP_START, 0, 6);
|
||||
$sResult .= '[time:'.\substr(\microtime(true) - $_SERVER['REQUEST_TIME_FLOAT'], 0, 6);
|
||||
$sResult .= '][AGPLv3';
|
||||
$sResult .= '][cached:'.($bCached ? 'true' : 'false');
|
||||
// $sResult .= '][hash:'.$aTemplateParameters['{{BaseHash}}'];
|
||||
|
|
|
|||
|
|
@ -170,6 +170,11 @@ class ServiceActions
|
|||
}
|
||||
catch (\Throwable $oException)
|
||||
{
|
||||
error_log($oException->getMessage());
|
||||
if ($e = $oException->getPrevious()) {
|
||||
error_log("\t".$e->getMessage());
|
||||
}
|
||||
|
||||
$aResponseItem = $this->oActions->ExceptionResponse(
|
||||
empty($sAction) ? 'Unknown' : $sAction, $oException);
|
||||
|
||||
|
|
@ -193,7 +198,7 @@ class ServiceActions
|
|||
|
||||
if (\is_array($aResponseItem))
|
||||
{
|
||||
$aResponseItem['Time'] = (int) ((\microtime(true) - APP_START) * 1000);
|
||||
$aResponseItem['Time'] = (int) ((\microtime(true) - $_SERVER['REQUEST_TIME_FLOAT']) * 1000);
|
||||
|
||||
$sUpdateToken = $this->oActions->GetUpdateAuthToken();
|
||||
if ($sUpdateToken)
|
||||
|
|
|
|||
|
|
@ -47,10 +47,7 @@ class Utils
|
|||
\RainLoop\Utils::$RsaKey = \is_string(\RainLoop\Utils::$RsaKey) ? \RainLoop\Utils::$RsaKey : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|false
|
||||
*/
|
||||
static public function EncryptStringRSA(string $sString, string $sKey = '')
|
||||
static public function EncryptStringRSA(string $sString, string $sKey = '') : string
|
||||
{
|
||||
$sResult = '';
|
||||
$sKey = \md5($sKey);
|
||||
|
|
@ -87,10 +84,7 @@ class Utils
|
|||
return $sResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|false
|
||||
*/
|
||||
static public function DecryptStringRSA(string $sString, string $sKey = '')
|
||||
static public function DecryptStringRSA(string $sString, string $sKey = '') : string
|
||||
{
|
||||
$sResult = '';
|
||||
$sKey = \md5($sKey);
|
||||
|
|
@ -425,6 +419,7 @@ class Utils
|
|||
$sAppPath = '';
|
||||
return $sAppPath;
|
||||
}
|
||||
|
||||
public static function WebVersionPath() : string
|
||||
{
|
||||
return self::WebPath().'rainloop/v/'.APP_VERSION.'/';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue