1
0
mirror of https://github.com/danog/tgseclib.git synced 2025-01-22 05:51:20 +01:00

Use !empty('0') instead of strlen('0')

Thanks petrich!
This commit is contained in:
terrafrost 2013-01-03 00:21:09 -06:00
parent aa3da09747
commit 9b4240c104
4 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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;
}