From a8c2ff0fb013169193c649adab512cafef5068cf Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sun, 30 Mar 2014 10:15:08 -0500 Subject: [PATCH] add error suppression to phpinfo() bad timezone settings can make phpinfo() throw errors so we'll just suppress them. if there are legit non-timezone errors with php install those will probably be hit in other parts of the code --- phpseclib/Crypt/RSA.php | 2 +- phpseclib/Math/BigInteger.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpseclib/Crypt/RSA.php b/phpseclib/Crypt/RSA.php index b6015178..018c1198 100644 --- a/phpseclib/Crypt/RSA.php +++ b/phpseclib/Crypt/RSA.php @@ -477,7 +477,7 @@ class Crypt_RSA case extension_loaded('openssl') && version_compare(PHP_VERSION, '4.2.0', '>=') && file_exists($this->configFile): // some versions of XAMPP have mismatched versions of OpenSSL which causes it not to work ob_start(); - phpinfo(); + @phpinfo(); $content = ob_get_contents(); ob_end_clean(); diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index 8bea6b7c..be1f948f 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -273,7 +273,7 @@ class Math_BigInteger if (function_exists('openssl_public_encrypt') && !defined('MATH_BIGINTEGER_OPENSSL_DISABLE') && !defined('MATH_BIGINTEGER_OPENSSL_ENABLED')) { // some versions of XAMPP have mismatched versions of OpenSSL which causes it not to work ob_start(); - phpinfo(); + @phpinfo(); $content = ob_get_contents(); ob_end_clean();