Skip to content
Snippets Groups Projects
Commit 0960f72f authored by Erick Hitter's avatar Erick Hitter
Browse files

Ensure that data retrieved in a `get_multi()` request is properly restored to...

Ensure that data retrieved in a `get_multi()` request is properly restored to the original data type.

See bd44ddf5.
parent bd44ddf5
Branches
No related tags found
No related merge requests found
...@@ -554,6 +554,9 @@ class WP_Object_Cache { ...@@ -554,6 +554,9 @@ class WP_Object_Cache {
// Build an array of values looked up, keyed by the derived cache key // Build an array of values looked up, keyed by the derived cache key
$group_cache = array_combine( $derived_keys, $group_cache ); $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 // 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 ); $group_cache = array_map( array( $this, 'filter_redis_get_multi' ), $group_cache );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment