From b165b06dcd58dcbbcb2853741c625dd06d7aa196 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sat, 16 May 2009 04:56:13 +0000 Subject: [PATCH] Check if delete_transient() exists to avoid error when upgrading from releases that don't define it. git-svn-id: https://develop.svn.wordpress.org/trunk@11356 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/update-core.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/update-core.php b/wp-admin/includes/update-core.php index 2e2b303bbd..9aac1e77b7 100644 --- a/wp-admin/includes/update-core.php +++ b/wp-admin/includes/update-core.php @@ -250,7 +250,10 @@ function update_core($from, $to) { $wp_filesystem->delete($from, true); // Force refresh of update information - delete_transient('update_core'); + if ( function_exists('delete_transient') ) + delete_transient('update_core'); + else + delete_option('update_core'); // Remove maintenance file, we're done. $wp_filesystem->delete($maintenance_file);