Bug: getABSPATH() on Windows
-
In the function getABSPATH, this line:
$path = “/”.$path.”/”;
results in something like
/C:/the-path/
when running under Windows.There is a WP function that does this correctly. The fix is simple:
public function getABSPATH(){ return \get_home_path(); }
And to make things even cleaner, replace all the occurrences of
$path = ABSPATH; if($this->is_subdirectory_install()){ $path = $this->getABSPATH(); }
with just
$path = get_home_path();
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Bug: getABSPATH() on Windows’ is closed to new replies.