diff options
author | tailor <cygnus@janrain.com> | 2006-01-04 21:35:30 +0000 |
---|---|---|
committer | tailor <cygnus@janrain.com> | 2006-01-04 21:35:30 +0000 |
commit | da4cb31f6c9c234cb5bf3c8373be301226891fc2 (patch) | |
tree | b61eaa4d8d0abd2f4c088d284c3804bf12687ee9 /Net | |
parent | dbfa1aa3a72715e35e12e7ce1b053bee33328a62 (diff) | |
download | php-openid-da4cb31f6c9c234cb5bf3c8373be301226891fc2.zip php-openid-da4cb31f6c9c234cb5bf3c8373be301226891fc2.tar.gz php-openid-da4cb31f6c9c234cb5bf3c8373be301226891fc2.tar.bz2 |
[project @ Fixed warning about non-string key for duplicate cache in PHP 5]
Diffstat (limited to 'Net')
-rw-r--r-- | Net/OpenID/CryptUtil.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Net/OpenID/CryptUtil.php b/Net/OpenID/CryptUtil.php index 487533a..060811e 100644 --- a/Net/OpenID/CryptUtil.php +++ b/Net/OpenID/CryptUtil.php @@ -291,11 +291,13 @@ class Net_OpenID_CryptUtil { $r = $lib->sub($stop, $start); - if (array_key_exists($r, $Net_OpenID_CryptUtil_duplicate_cache)) { + // DO NOT MODIFY THIS VALUE. + $rbytes = Net_OpenID_CryptUtil::longToBinary($r); + + if (array_key_exists($rbytes, $Net_OpenID_CryptUtil_duplicate_cache)) { list($duplicate, $nbytes) = - $Net_OpenID_CryptUtil_duplicate_cache[$r]; + $Net_OpenID_CryptUtil_duplicate_cache[$rbytes]; } else { - $rbytes = Net_OpenID_CryptUtil::longToBinary($r); if ($rbytes[0] == '\x00') { $nbytes = strlen($rbytes) - 1; } else { @@ -312,7 +314,7 @@ class Net_OpenID_CryptUtil { $Net_OpenID_CryptUtil_duplicate_cache = array(); } - $Net_OpenID_CryptUtil_duplicate_cache[$r] = + $Net_OpenID_CryptUtil_duplicate_cache[$rbytes] = array($duplicate, $nbytes); } |