From f9109867a29fd6ade880180fe65c01408f46384b Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Wed, 2 Jan 2013 21:51:39 +0700 Subject: [PATCH] set assignment in the first place --- src/Adapter/Digest.php | 2 +- src/Adapter/Http.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Adapter/Digest.php b/src/Adapter/Digest.php index 18481e9..19b12b0 100644 --- a/src/Adapter/Digest.php +++ b/src/Adapter/Digest.php @@ -226,7 +226,7 @@ protected function _secureStringCompare($a, $b) return false; } $result = 0; - for ($i = 0; $len = strlen($a), $i < $len; $i++) { + for ($i = 0, $len = strlen($a); $i < $len; $i++) { $result |= ord($a[$i]) ^ ord($b[$i]); } return $result == 0; diff --git a/src/Adapter/Http.php b/src/Adapter/Http.php index 7d09927..1589e05 100644 --- a/src/Adapter/Http.php +++ b/src/Adapter/Http.php @@ -819,7 +819,7 @@ protected function _secureStringCompare($a, $b) return false; } $result = 0; - for ($i = 0; $len = strlen($a), $i < $len; $i++) { + for ($i = 0, $len = strlen($a); $i < $len; $i++) { $result |= ord($a[$i]) ^ ord($b[$i]); } return $result == 0;