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:
Andrew Nacin 2012-07-20 20:15:25 +00:00
parent a5d94bef07
commit 09c0ae245f
1 changed files with 3 additions and 0 deletions

View File

@ -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;