Bugfix for PHP 8

This commit is contained in:
djmaze 2021-11-16 23:41:52 +01:00
parent 071dab01a7
commit 0d22cfd955
2 changed files with 7 additions and 2 deletions

View file

@ -695,7 +695,12 @@ trait Admin
public function DoAdminPHPExtensions() : array
{
$aResult = [];
$aResult = [
[
'name' => 'PHP ' . PHP_VERSION,
'loaded' => true
]
];
foreach (['APCu', 'cURL','GD','Gmagick','Imagick','intl','LDAP','OpenSSL','pdo_mysql','pdo_pgsql','pdo_sqlite','Sodium','XXTEA','Zip'] as $name) {
$aResult[] = [
'name' => $name,

View file

@ -4,7 +4,7 @@ namespace SnappyMail;
abstract class TOTP
{
public function Verify(string $sSecret, string $sCode) : bool
public static function Verify(string $sSecret, string $sCode) : bool
{
$key = static::Base32Decode($sSecret);
$algo = 'SHA1'; // Google Authenticator doesn't support SHA256