From 2140de74d01b1ebb8c76f5bf81acbcd39fe1d6b2 Mon Sep 17 00:00:00 2001 From: Jim Wigginton Date: Sun, 26 Sep 2010 05:02:10 +0000 Subject: [PATCH] - fixed a warning in Crypt_Rijndael git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@123 21d32557-59b3-4da0-833f-c5933fad653e --- phpseclib/Crypt/Rijndael.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpseclib/Crypt/Rijndael.php b/phpseclib/Crypt/Rijndael.php index f81fb78f..d16fb8e6 100644 --- a/phpseclib/Crypt/Rijndael.php +++ b/phpseclib/Crypt/Rijndael.php @@ -64,7 +64,7 @@ * @author Jim Wigginton * @copyright MMVIII Jim Wigginton * @license http://www.gnu.org/licenses/lgpl.txt - * @version $Id: Rijndael.php,v 1.14 2010-09-26 03:10:20 terrafrost Exp $ + * @version $Id: Rijndael.php,v 1.15 2010-09-26 05:02:10 terrafrost Exp $ * @link http://phpseclib.sourceforge.net */ @@ -684,7 +684,7 @@ class Crypt_Rijndael { break; case CRYPT_RIJNDAEL_MODE_CTR: $xor = $this->encryptIV; - if (strlen($buffer)) { + if (!empty($buffer)) { for ($i = 0; $i < strlen($plaintext); $i+=$block_size) { $block = substr($plaintext, $i, $block_size); $buffer.= $this->_encryptBlock($this->_generate_xor($block_size, $xor));