diff --git a/phpseclib/Crypt/DES.php b/phpseclib/Crypt/DES.php index 6a6d3389..e377c3a8 100644 --- a/phpseclib/Crypt/DES.php +++ b/phpseclib/Crypt/DES.php @@ -597,7 +597,7 @@ class Crypt_DES { } break; case CRYPT_DES_MODE_CFB: - if (!empty($buffer['xor'])) { + if (strlen($buffer['xor'])) { $ciphertext = $plaintext ^ $buffer['xor']; $iv = $buffer['encrypted'] . $ciphertext; $start = strlen($ciphertext); diff --git a/phpseclib/Crypt/Rijndael.php b/phpseclib/Crypt/Rijndael.php index 71155c89..fec684a0 100644 --- a/phpseclib/Crypt/Rijndael.php +++ b/phpseclib/Crypt/Rijndael.php @@ -763,7 +763,7 @@ class Crypt_Rijndael { } break; case CRYPT_RIJNDAEL_MODE_CFB: - if (!empty($buffer['xor'])) { + if (strlen($buffer['xor'])) { $ciphertext = $plaintext ^ $buffer['xor']; $iv = $buffer['encrypted'] . $ciphertext; $start = strlen($ciphertext); diff --git a/phpseclib/Crypt/TripleDES.php b/phpseclib/Crypt/TripleDES.php index faf8c18a..1e34acf3 100644 --- a/phpseclib/Crypt/TripleDES.php +++ b/phpseclib/Crypt/TripleDES.php @@ -617,7 +617,7 @@ class Crypt_TripleDES { } break; case CRYPT_DES_MODE_CFB: - if (!empty($buffer['xor'])) { + if (strlen($buffer['xor'])) { $ciphertext = $plaintext ^ $buffer['xor']; $iv = $buffer['encrypted'] . $ciphertext; $start = strlen($ciphertext); diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index 04bcdf40..d048cb03 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -302,7 +302,7 @@ class Math_BigInteger { } // '0' counts as empty() but when the base is 256 '0' is equal to ord('0') or 48 - // '0' is the only value like this per http://php.net/empty + // '0' is the only value like this per http://php.net/empty if (empty($x) && (abs($base) != 256 || $x !== '0')) { return; }