Disable PHP GnuPG PECL when version < 1.5 see #325

This commit is contained in:
the-djmaze 2022-04-16 01:37:50 +02:00
parent 05aae219dd
commit 9a63071292

View file

@ -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',