From 19a6c84f7c25b2eb5a539b083999c2365b23f230 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 3 Jun 2009 19:27:21 +0000 Subject: - Patch #480428 by JamesAn: static caching API. --- modules/openid/openid.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/openid') 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"); -- cgit v1.2.3