WordPress.org

Make WordPress Core

Changeset 21294


Ignore:
Timestamp:
07/20/2012 08:15:25 PM (6 years ago)
Author:
nacin
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/cache.php

    r21285 r21294  
    324324     */
    325325    function decr( $key, $offset = 1, $group = 'default' ) {
     326        if ( empty( $group ) )
     327            $group = 'default';
     328       
    326329        if ( ! $this->_exists( $key, $group ) )
    327330            return false;
Note: See TracChangeset for help on using the changeset viewer.