Don't delete site transient if it doesn't have a timeout set. fixes #11844

git-svn-id: http://svn.automattic.com/wordpress/trunk@12684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-01-10 02:39:24 +00:00
parent 2ff7f83b99
commit b26dc3c874
1 changed files with 2 additions and 1 deletions

View File

@ -3396,7 +3396,8 @@ function get_site_transient($transient) {
} else {
$transient_option = '_site_transient_' . esc_sql($transient);
$transient_timeout = '_site_transient_timeout_' . esc_sql($transient);
if ( get_site_option($transient_timeout) < time() ) {
$timeout = get_site_option($transient_timeout);
if ( false !== $timeout && $timeout < time() ) {
delete_site_option($transient_option);
delete_site_option($transient_timeout);
return false;