WordPress.org

Make WordPress Core

Changeset 25075


Ignore:
Timestamp:
08/21/2013 07:13:35 PM (5 years ago)
Author:
duck_
Message:

Pass false returned for timed out transients through transient_$transient filter.

This brings the same behaviour as external object caches to the default database
backend.

Props johnbillion. Fixes #24685.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/option.php

    r25043 r25075  
    462462                    delete_option( $transient_option  );
    463463                    delete_option( $transient_timeout );
    464                     return false;
     464                    $value = false;
    465465                }
    466466            }
    467467        }
    468468
    469         $value = get_option( $transient_option );
     469        if ( ! isset( $value ) )
     470            $value = get_option( $transient_option );
    470471    }
    471472
     
    10301031                delete_site_option( $transient_option  );
    10311032                delete_site_option( $transient_timeout );
    1032                 return false;
     1033                $value = false;
    10331034            }
    10341035        }
    10351036
    1036         $value = get_site_option( $transient_option );
     1037        if ( ! isset( $value ) )
     1038            $value = get_site_option( $transient_option );
    10371039    }
    10381040
Note: See TracChangeset for help on using the changeset viewer.