WP_Filesystem_Base->abspath() should use the WPINC constant

Props wojtek.szkutnik
See #14157.


git-svn-id: https://develop.svn.wordpress.org/trunk@28904 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-06-29 22:15:10 +00:00
parent dcd7ff837d
commit 48c145ee78

View File

@ -95,7 +95,7 @@ class WP_Filesystem_Base {
public function abspath() { public function abspath() {
$folder = $this->find_folder(ABSPATH); $folder = $this->find_folder(ABSPATH);
// Perhaps the FTP folder is rooted at the WordPress install, Check for wp-includes folder in root, Could have some false positives, but rare. // Perhaps the FTP folder is rooted at the WordPress install, Check for wp-includes folder in root, Could have some false positives, but rare.
if ( ! $folder && $this->is_dir('/wp-includes') ) if ( ! $folder && $this->is_dir( '/' . WPINC ) )
$folder = '/'; $folder = '/';
return $folder; return $folder;
} }