diff --git a/phpseclib/Crypt/RSA.php b/phpseclib/Crypt/RSA.php index c5f69770..49a61f3b 100644 --- a/phpseclib/Crypt/RSA.php +++ b/phpseclib/Crypt/RSA.php @@ -3128,7 +3128,9 @@ class Crypt_RSA } // Compare - return $this->_equals($em, $em2) || $this->_equals($em, $em3); + + return ($em2 !== false && $this->_equals($em, $em2)) || + ($em3 !== false && $this->_equals($em, $em3)); } /**