Transients: If `get_option( $transient_timeout )` returns false, don't bother trying to delete the transient in `get_transient()`.
props jamesgol, ericmann. fixes #30380. Built from https://develop.svn.wordpress.org/trunk@33110 git-svn-id: http://core.svn.wordpress.org/trunk@33081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
acad0e2008
commit
92fe9c9649
|
@ -622,7 +622,8 @@ function get_transient( $transient ) {
|
|||
$alloptions = wp_load_alloptions();
|
||||
if ( !isset( $alloptions[$transient_option] ) ) {
|
||||
$transient_timeout = '_transient_timeout_' . $transient;
|
||||
if ( get_option( $transient_timeout ) < time() ) {
|
||||
$timeout = get_option( $transient_timeout );
|
||||
if ( false !== $timeout && $timeout < time() ) {
|
||||
delete_option( $transient_option );
|
||||
delete_option( $transient_timeout );
|
||||
$value = false;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.3-beta1-33109';
|
||||
$wp_version = '4.3-beta1-33110';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue