From 0960f72f7d80ec827738d467b8a5f0c9fcde2596 Mon Sep 17 00:00:00 2001
From: Erick Hitter <ehitter@gmail.com>
Date: Wed, 5 Mar 2014 21:26:27 -0800
Subject: [PATCH] Ensure that data retrieved in a `get_multi()` request is
 properly restored to the original data type.

See bd44ddf50.
---
 object-cache.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/object-cache.php b/object-cache.php
index e4e115e..b34763a 100644
--- a/object-cache.php
+++ b/object-cache.php
@@ -554,6 +554,9 @@ class WP_Object_Cache {
 				// Build an array of values looked up, keyed by the derived cache key
 				$group_cache = array_combine( $derived_keys, $group_cache );
 
+				// Restores cached data to its original data type
+				$group_cache = array_map( array( $this, 'restore_value_from_redis' ), $group_cache );
+
 				// Redis returns null for values not found in cache, but expected return value is false in this instance
 				$group_cache = array_map( array( $this, 'filter_redis_get_multi' ), $group_cache );
 
-- 
GitLab