WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/31/2009 09:08:03 PM (11 years ago)
Author:
azaozz
Message:

Test writability of ABSPATH when upgrading core or WP_PLUGIN_DIR when installing/updating themes and plugins, fixes #9936

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/update-core.php

    r11383 r11499  
    143143        $url = 'update-core.php?action=do-core-upgrade';
    144144    $url = wp_nonce_url($url, 'upgrade-core');
    145     if ( false === ($credentials = request_filesystem_credentials($url)) )
     145    if ( false === ($credentials = request_filesystem_credentials($url, '', false, ABSPATH)) )
    146146        return;
    147147
     
    153153
    154154
    155     if ( ! WP_Filesystem($credentials) ) {
    156         request_filesystem_credentials($url, '', true); //Failed to connect, Error and request again
     155    if ( ! WP_Filesystem($credentials, ABSPATH) ) {
     156        request_filesystem_credentials($url, '', true, ABSPATH); //Failed to connect, Error and request again
    157157        return;
    158158    }
Note: See TracChangeset for help on using the changeset viewer.