From 9a630712926ebce5c122271c30a1f42d7b630cbe Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Sat, 16 Apr 2022 01:37:50 +0200 Subject: [PATCH] Disable PHP GnuPG PECL when version < 1.5 see #325 --- snappymail/v/0.0.0/app/libraries/snappymail/pgp/gnupg.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/snappymail/v/0.0.0/app/libraries/snappymail/pgp/gnupg.php b/snappymail/v/0.0.0/app/libraries/snappymail/pgp/gnupg.php index 827d2b83b..7e8382c17 100644 --- a/snappymail/v/0.0.0/app/libraries/snappymail/pgp/gnupg.php +++ b/snappymail/v/0.0.0/app/libraries/snappymail/pgp/gnupg.php @@ -25,8 +25,7 @@ class GnuPG $this->homedir = $homedir; // \putenv("GNUPGHOME={$homedir}"); -// if (\version_compare(\phpversion('gnupg'), '1.5', '>=')) { - if (\class_exists('gnupg')) { + if (\class_exists('gnupg') && \version_compare(\phpversion('gnupg'), '1.5', '>=')) { $this->GnuPG = new \gnupg([ // It is the file name of the executable program implementing this protocol which is usually path of the gpg executable. // 'file_name' => '/usr/bin/gpg',