mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #3323 from dhensby/patch-2
FIX Handle empty URLs that are made absolute
This commit is contained in:
commit
76f719c94b
@ -425,7 +425,7 @@ class Director implements TemplateGlobalProvider {
|
||||
}
|
||||
|
||||
if(substr($url,0,4) != "http") {
|
||||
if($url[0] != "/") $url = Director::baseURL() . $url;
|
||||
if(strpos($url, '/') !== 0) $url = Director::baseURL() . $url;
|
||||
// Sometimes baseURL() can return a full URL instead of just a path
|
||||
if(substr($url,0,4) != "http") $url = self::protocolAndHost() . $url;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user