Check existence of phpinfo() before using

This commit is contained in:
David Anderson 2021-12-21 14:19:00 +00:00 committed by GitHub
parent dd9dfeec18
commit a9ed96833e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -257,7 +257,7 @@ class Math_BigInteger
}
}
if (extension_loaded('openssl') && !defined('MATH_BIGINTEGER_OPENSSL_DISABLE') && !defined('MATH_BIGINTEGER_OPENSSL_ENABLED')) {
if (function_exists('phpinfo') && extension_loaded('openssl') && !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();