mirror of
https://github.com/getgrav/grav.git
synced 2026-03-04 19:41:36 +01:00
Fixed "Invalid AJAX response" When using Built-in PHP Webserver in Windows (#1258)
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
* Reverted `case_insensitive_urls` option as it was causing issues with taxonomy [#1733](https://github.com/getgrav/grav/pull/1733)
|
||||
* Removed an extra `/` in `CompileFile.php` [#1693](https://github.com/getgrav/grav/pull/1693)
|
||||
* Uri: Encode user and password to prevent issues in browsers
|
||||
* Fixed "Invalid AJAX response" When using Built-in PHP Webserver in Windows [#1258](https://github.com/getgrav/grav/issues/1258)
|
||||
|
||||
# v1.3.8
|
||||
## 10/26/2017
|
||||
|
||||
@@ -249,7 +249,8 @@ class Uri
|
||||
*/
|
||||
private function buildRootPath()
|
||||
{
|
||||
$scriptPath = $_SERVER['PHP_SELF'];
|
||||
// In Windows script path uses backslash, convert it:
|
||||
$scriptPath = str_replace('\\', '/', $_SERVER['PHP_SELF']);
|
||||
$rootPath = str_replace(' ', '%20', rtrim(substr($scriptPath, 0, strpos($scriptPath, 'index.php')), '/'));
|
||||
|
||||
// check if userdir in the path and workaround PHP bug with PHP_SELF
|
||||
|
||||
Reference in New Issue
Block a user