Ticket #11464: 11464.2.diff
File 11464.2.diff, 1.2 KB (added by , 15 years ago) |
---|
-
wp-admin/includes/update-core.php
215 215 * @return WP_Error|null WP_Error on failure, null on success. 216 216 */ 217 217 function update_core($from, $to) { 218 global $wp_filesystem, $_old_files ;218 global $wp_filesystem, $_old_files, $wpdb; 219 219 220 220 @set_time_limit( 300 ); 221 221 222 //Check for required PHP and MYSQL versions 223 $mysql_version = $wpdb->db_version(); 224 $php_version = phpversion(); 225 if ( ( version_compare(, '4.1.2', '<') && !file_exists( WP_CONTENT_DIR . '/db.php' ) ) || version_compare(, '4.3', '<') ) { 226 return new WP_Error('not_compatible', sprintf(__('The update cannot be install because you do not have the correct PHP (%1$s vs 4.3 or newer) and mysql versions (%2$s vs 4.1.2 or newer).'), $mysql_version, $php_version) ); 227 } 228 222 229 // Sanity check the unzipped distribution 223 230 apply_filters('update_feedback', __('Verifying the unpacked files')); 224 231 if ( !$wp_filesystem->exists($from . '/wordpress/wp-settings.php') || !$wp_filesystem->exists($from . '/wordpress/wp-admin/admin.php') ||