[topic/40730] Use strlen() instead of count() in function _equals() of Crypt_RSA.

It appears that count() always returns int(1) on strings. Thus, this check is
pointless as is. strlen() was meant here and is actually required to prevent
E_NOTICEs from invalid array accesses using $y[$i].
This commit is contained in:
Andreas Fischer 2012-06-05 12:52:00 +02:00
parent e484373a2b
commit 71dea1fc2b

View File

@ -1791,7 +1791,7 @@ class Crypt_RSA {
*/
function _equals($x, $y)
{
if (count($x) != count($y)) {
if (strlen($x) != strlen($y)) {
return false;
}