From bc2b945fbb0189a22e944db9acf188f8736bc702 Mon Sep 17 00:00:00 2001
From: Angie Byron <webchick@24967.no-reply.drupal.org>
Date: Tue, 1 Sep 2009 20:43:21 +0000
Subject: [PATCH] #556156 by Rob Loach and doq: Fixed incorrect usage of
 variable_get(bin).

---
 includes/cache.inc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/includes/cache.inc b/includes/cache.inc
index 1af01d832e9b..e87e2f889d94 100644
--- a/includes/cache.inc
+++ b/includes/cache.inc
@@ -18,8 +18,8 @@ function _cache_get_object($bin) {
   // storage of a cache bin mid-request.
   static $cache_objects, $default_class;
   if (!isset($cache_objects[$bin])) {
-    $class = variable_get($bin, FALSE);
-    if (empty($class)) {
+    $class = variable_get('cache_class_' . $bin);
+    if (!isset($class)) {
       $class = variable_get('cache_default_class', 'DrupalDatabaseCache');
     }
     $cache_objects[$bin] = new $class($bin);
@@ -152,7 +152,7 @@ function cache_set($cid, $data, $bin = 'cache', $expire = CACHE_PERMANENT, array
  * @param $wildcard
  *   If $wildcard is TRUE, cache IDs starting with $cid are deleted in
  *   addition to the exact cache ID specified by $cid.  If $wildcard is
- *   TRUE and $cid is '*' then the entire table $table is emptied. 
+ *   TRUE and $cid is '*' then the entire table $table is emptied.
  */
 function cache_clear_all($cid = NULL, $bin = NULL, $wildcard = FALSE) {
   if (!isset($cid) && !isset($bin)) {
@@ -398,7 +398,7 @@ function clear($cid = NULL, $wildcard = FALSE) {
         // simulate that the cache was flushed for this user by not returning
         // cached data that was cached before the timestamp.
         $user->cache = REQUEST_TIME;
-  
+
         $cache_flush = variable_get('cache_flush_' . $this->bin, 0);
         if ($cache_flush == 0) {
           // This is the first request to clear the cache, start a timer.
-- 
GitLab