### Eclipse Workspace Patch 1.0
#P wordpress-trunk
|
|
|
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 | if ( ( version_compare($wpdb->db_version(), '4.1.2', '<') && !file_exists( WP_CONTENT_DIR . '/db.php' ) ) || version_compare(phpversion(), '4.3', '<') ) { |
| 224 | return new WP_Error('not_compatible', __('The update cannot be install because you do not have the correct PHP (4.3 or newer) and mysql versions (4.1.2 or newer).') ); |
| 225 | } |
| 226 | |
222 | 227 | // Sanity check the unzipped distribution |
223 | 228 | apply_filters('update_feedback', __('Verifying the unpacked files')); |
224 | 229 | if ( !$wp_filesystem->exists($from . '/wordpress/wp-settings.php') || !$wp_filesystem->exists($from . '/wordpress/wp-admin/admin.php') || |