Let PECL::isSupported() return false instead

This commit is contained in:
the-djmaze 2024-03-18 17:51:56 +01:00
parent b98b21c1c6
commit c2c72dc4be
2 changed files with 3 additions and 4 deletions

View file

@ -12,7 +12,7 @@ abstract class GnuPG
{
public static function isSupported() : bool
{
return GPG::isSupported();
return GPG::isSupported() || PECL::isSupported();
}
private static $instance = null;
@ -22,11 +22,9 @@ abstract class GnuPG
if (GPG::isSupported()) {
static::$instance = new GPG($homedir);
}
/*
else if (PECL::isSupported()) {
static::$instance = new PECL($homedir);
}
*/
}
return static::$instance;
}

View file

@ -56,7 +56,8 @@ class PECL implements \SnappyMail\PGP\PGPInterface
public static function isSupported() : bool
{
return \class_exists('gnupg') && \version_compare(\phpversion('gnupg'), '1.5', '>=');
// Disabled due to failures with "no passphrase" while a passphrase does exist
return false && \class_exists('gnupg') && \version_compare(\phpversion('gnupg'), '1.5', '>=');
}
public function gnupgError()