mirror of
https://github.com/getgrav/grav.git
synced 2026-06-17 00:10:41 +02:00
Fix for illegal offset scheme errors
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
# v1.3.11
|
||||
## mm/dd/2017
|
||||
|
||||
1. [](#bugfix)
|
||||
* Fixed issue with _illegal scheme offset_ in `Uri::convertUrl()` [page-inject#8](https://github.com/getgrav/grav-plugin-page-inject/issues/8)
|
||||
|
||||
# v1.3.10
|
||||
## 12/06/2017
|
||||
|
||||
1. [](#bugfix)
|
||||
* Reverted GPM Local pull request as it broken admin [#1742](https://github.com/getgrav/grav/issues/1742)
|
||||
|
||||
1. [](#new)
|
||||
|
||||
# v1.3.9
|
||||
## 12/05/2017
|
||||
|
||||
|
||||
@@ -941,7 +941,7 @@ class Uri
|
||||
}
|
||||
|
||||
// handle absolute URLs
|
||||
if (!$external && ($absolute === true || $grav['config']->get('system.absolute_urls', false))) {
|
||||
if (is_array($url) && !$external && ($absolute === true || $grav['config']->get('system.absolute_urls', false))) {
|
||||
|
||||
$url['scheme'] = $uri->scheme(true);
|
||||
$url['host'] = $uri->host();
|
||||
@@ -983,6 +983,11 @@ class Uri
|
||||
}
|
||||
}
|
||||
|
||||
// Handle route only
|
||||
if ($route_only) {
|
||||
$url_path = str_replace($base_url, '', $url_path);
|
||||
}
|
||||
|
||||
// transform back to string/array as needed
|
||||
if (is_array($url)) {
|
||||
$url['path'] = $url_path;
|
||||
@@ -990,10 +995,6 @@ class Uri
|
||||
$url = $url_path;
|
||||
}
|
||||
|
||||
if ($route_only) {
|
||||
$url = str_replace($base_url, '', $url);
|
||||
}
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user