Make WordPress Core


Ignore:
Timestamp:
07/07/2015 04:44:08 PM (10 years ago)
Author:
ocean90
Message:

Transients: If get_option( $transient_timeout ) returns false, don't bother trying to delete the transient in get_transient().

props jamesgol, ericmann.
fixes #30380.

File:
1 edited

Legend:

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

    r32943 r33110  
    623623            if ( !isset( $alloptions[$transient_option] ) ) {
    624624                $transient_timeout = '_transient_timeout_' . $transient;
    625                 if ( get_option( $transient_timeout ) < time() ) {
     625                $timeout = get_option( $transient_timeout );
     626                if ( false !== $timeout && $timeout < time() ) {
    626627                    delete_option( $transient_option  );
    627628                    delete_option( $transient_timeout );
Note: See TracChangeset for help on using the changeset viewer.