diff --git a/phpseclib/File/X509.php b/phpseclib/File/X509.php index 7aa278f2..a99252eb 100644 --- a/phpseclib/File/X509.php +++ b/phpseclib/File/X509.php @@ -164,7 +164,7 @@ class X509 * * @var array */ - private $CAs; + private $CAs = []; /** * The currently loaded certificate @@ -2030,9 +2030,6 @@ class X509 if (!is_array($this->currentCert) || !isset($this->currentCert['tbsCertificate'])) { return false; } - if (empty($this->CAs)) { - return $chain; - } while (true) { $currentCert = $chain[count($chain) - 1]; for ($i = 0; $i < count($this->CAs); $i++) {