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: http://core.svn.wordpress.org/trunk@21294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2012-07-20 20:15:25 +00:00
parent 95cfdf2fd6
commit 167124051b

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;