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

Correct error in how additional global and non-persistent groups are added,...

Correct error in how additional global and non-persistent groups are added, which corrupted the arrays holding those groups.

In 868c0a8c, I blindly copied two missing functions from another object caching plugin, not paying enough attention to how that plugin managed the data versus how this plugin does. As a result, the arrays of groups had some entries keyed by the group, others were unkeyed and the value represented the group.
parent 2b9e8ed3
No related branches found
No related tags found
No related merge requests found
......@@ -1071,8 +1071,7 @@ class WP_Object_Cache {
function add_global_groups( $groups ) {
$groups = (array) $groups;
$groups = array_fill_keys( $groups, true );
$this->global_groups = array_merge( $this->global_groups, $groups );
$this->global_groups = array_unique( array_merge( $this->global_groups, $groups ) );
}
/**
......@@ -1083,7 +1082,6 @@ class WP_Object_Cache {
function add_non_persistent_groups( $groups ) {
$groups = (array) $groups;
$groups = array_fill_keys( $groups, true );
$this->no_redis_groups = array_merge( $this->no_redis_groups, $groups );
$this->no_redis_groups = array_unique( array_merge( $this->no_redis_groups, $groups ) );
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment