diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-06-03 19:27:21 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-06-03 19:27:21 +0000 |
commit | 19a6c84f7c25b2eb5a539b083999c2365b23f230 (patch) | |
tree | a035c2b156a2f79c291ac23e9c5d13b48bd74041 /modules | |
parent | 2e049e5b785351fce3d92127ab002815baeb953a (diff) | |
download | brdo-19a6c84f7c25b2eb5a539b083999c2365b23f230.tar.gz brdo-19a6c84f7c25b2eb5a539b083999c2365b23f230.tar.bz2 |
- Patch #480428 by JamesAn: static caching API.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/openid/openid.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/openid/openid.inc b/modules/openid/openid.inc index debf16169..8115f1282 100644 --- a/modules/openid/openid.inc +++ b/modules/openid/openid.inc @@ -350,7 +350,7 @@ function _openid_dh_xorsecret($shared, $secret) { } function _openid_dh_rand($stop) { - static $duplicate_cache = array(); + $duplicate_cache = &drupal_static(__FUNCTION__, array()); // Used as the key for the duplicate cache $rbytes = _openid_dh_long_to_binary($stop); @@ -389,7 +389,7 @@ function _openid_dh_rand($stop) { } function _openid_get_bytes($num_bytes) { - static $f = NULL; + $f = &drupal_static(__FUNCTION__); $bytes = ''; if (!isset($f)) { $f = @fopen(OPENID_RAND_SOURCE, "r"); |