Make WordPress Core

Ticket #24685: 24685.patch

File 24685.patch, 1.0 KB (added by johnbillion, 12 years ago)
  • wp-includes/option.php

     
    461461                                if ( get_option( $transient_timeout ) < time() ) {
    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
    472473        return apply_filters( 'transient_' . $transient, $value );
     
    10011002                        if ( false !== $timeout && $timeout < time() ) {
    10021003                                delete_site_option( $transient_option  );
    10031004                                delete_site_option( $transient_timeout );
    1004                                 return false;
     1005                                $value = false;
    10051006                        }
    10061007                }
    10071008
    1008                 $value = get_site_option( $transient_option );
     1009                if ( !isset( $value ) )
     1010                        $value = get_site_option( $transient_option );
    10091011        }
    10101012
    10111013        return apply_filters( 'site_transient_' . $transient, $value );