From 09c0ae245f30fae425cc7c0255357b221ef6f28b Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 20 Jul 2012 20:15:25 +0000 Subject: [PATCH] If $group is empty in WP_Object_Cache::decr(), consider it to be 'default'. This is consistent with the rest of the cache methods wrapped by functions; the functions pass an empty string by default, hence the need for this check. props bananastalktome. fixes #21327. git-svn-id: https://develop.svn.wordpress.org/trunk@21294 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/cache.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/cache.php b/wp-includes/cache.php index 415566902a..e3d085adf5 100644 --- a/wp-includes/cache.php +++ b/wp-includes/cache.php @@ -323,6 +323,9 @@ class WP_Object_Cache { * @return false|int False on failure, the item's new value on success. */ function decr( $key, $offset = 1, $group = 'default' ) { + if ( empty( $group ) ) + $group = 'default'; + if ( ! $this->_exists( $key, $group ) ) return false;