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
This commit is contained in:
parent
a5d94bef07
commit
09c0ae245f
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue