WordPress.org

Make WordPress Core

Ticket #10906: 10906.2.diff

File 10906.2.diff, 785 bytes (added by Denis-de-Bernardy, 5 years ago)

patch also fixes a typo in the code

  • wp-admin/includes/class-wp-upgrader.php

     
    9393                        elseif ( WP_CONTENT_DIR . '/themes' == $dir && ! $wp_filesystem->find_folder(WP_CONTENT_DIR . '/themes') ) 
    9494                                return new WP_Error('fs_no_themes_dir', $this->strings['fs_no_themes_dir']); 
    9595 
    96                         elseif ( ! $wp_filesystem->find_folder($dir) ) 
    97                                 return new WP_Error('fs_no_folder', sprintf($strings['fs_no_folder'], $dir)); 
     96                        elseif ( ABSPATH != $dir && ! $wp_filesystem->find_folder($dir) ) 
     97                                return new WP_Error('fs_no_folder', sprintf($this->strings['fs_no_folder'], $dir)); 
    9898                } 
    9999                return true; 
    100100        } //end fs_connect();