From f2a4aecc054eeb730a2e0112657e4ca4b24445c2 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 17 Jul 2022 06:34:37 +0000 Subject: [PATCH] Check for GMP module --- src/Contact/Avatar.php | 2 +- src/Core/Installer.php | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Contact/Avatar.php b/src/Contact/Avatar.php index f43ed7b8c7..1dd2f9cee6 100644 --- a/src/Contact/Avatar.php +++ b/src/Contact/Avatar.php @@ -263,7 +263,7 @@ class Avatar { $localFile = self::getCacheFile($avatar); if (!empty($localFile)) { - unlink($localFile); + @unlink($localFile); Logger::debug('Unlink avatar', ['avatar' => $avatar]); } } diff --git a/src/Core/Installer.php b/src/Core/Installer.php index ff759c9feb..9a9bdfb5f7 100644 --- a/src/Core/Installer.php +++ b/src/Core/Installer.php @@ -486,6 +486,13 @@ class Installer ); $returnVal = $returnVal ? $status : false; + $status = $this->checkFunction('gmp_strval', + DI::l10n()->t('GNU Multiple Precision PHP module'), + DI::l10n()->t('Error: GNU Multiple Precision PHP module required but not installed.'), + true + ); + $returnVal = $returnVal ? $status : false; + return $returnVal; }