Make WordPress Core

Ticket #11464: 11464.diff

File 11464.diff, 1.1 KB (added by westi, 15 years ago)

A possible fix - as yet untested

  • wp-admin/includes/update-core.php

    ### Eclipse Workspace Patch 1.0
    #P wordpress-trunk
     
    215215 * @return WP_Error|null WP_Error on failure, null on success.
    216216 */
    217217function update_core($from, $to) {
    218         global $wp_filesystem, $_old_files;
     218        global $wp_filesystem, $_old_files, $wpdb;
    219219
    220220        @set_time_limit( 300 );
    221221
     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       
    222227        // Sanity check the unzipped distribution
    223228        apply_filters('update_feedback', __('Verifying the unpacked files'));
    224229        if ( !$wp_filesystem->exists($from . '/wordpress/wp-settings.php') || !$wp_filesystem->exists($from . '/wordpress/wp-admin/admin.php') ||