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
This commit is contained in:
Ryan Boren 2009-05-16 04:56:13 +00:00
parent 2511d7e2c3
commit b165b06dcd

View File

@ -250,7 +250,10 @@ function update_core($from, $to) {
$wp_filesystem->delete($from, true);
// Force refresh of update information
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);