diff --git a/phpseclib/Crypt/Base.php b/phpseclib/Crypt/Base.php index 1336d0ef..e88476b9 100644 --- a/phpseclib/Crypt/Base.php +++ b/phpseclib/Crypt/Base.php @@ -537,13 +537,13 @@ class Crypt_Base if (!defined('CRYPT_BASE_USE_REG_INTVAL')) { switch (true) { // PHP 5.3, per http://php.net/releases/5_3_0.php, introduced "more consistent float rounding" - case version_compare(PHP_VERSION, '5.3.0') >= 0 && (php_uname('m') & "\xDF\xDF\xDF") != 'ARM': + case version_compare(PHP_VERSION, '5.3.0') >= 0 && !(is_string(php_uname('m')) && (php_uname('m') & "\xDF\xDF\xDF") == 'ARM'): // PHP_OS & "\xDF\xDF\xDF" == strtoupper(substr(PHP_OS, 0, 3)), but a lot faster case (PHP_OS & "\xDF\xDF\xDF") === 'WIN': case PHP_INT_SIZE == 8: define('CRYPT_BASE_USE_REG_INTVAL', true); break; - case (php_uname('m') & "\xDF\xDF\xDF") == 'ARM': + case is_string(php_uname('m')) && (php_uname('m') & "\xDF\xDF\xDF") == 'ARM': switch (true) { // PHP_VERSION_ID wasn't a constant until PHP 5.2.7 case version_compare(PHP_VERSION, '5.3.0') < 1: