From 92fe9c9649eb022e2450ce104efa736698dd5f8d Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Tue, 7 Jul 2015 16:45:26 +0000 Subject: [PATCH] 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 --- wp-includes/option.php | 3 ++- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/option.php b/wp-includes/option.php index 1157b56d94..1b5dde235c 100644 --- a/wp-includes/option.php +++ b/wp-includes/option.php @@ -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; diff --git a/wp-includes/version.php b/wp-includes/version.php index e25f7509ab..803f2ebab6 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.