Merge pull request #6953 from tobiasd/20190330-csspath
check if BasePath is empty to prevent mangeled up CSS path
This commit is contained in:
commit
e5cc35cb45
|
@ -182,9 +182,11 @@ class App
|
|||
*/
|
||||
public function registerStylesheet($path)
|
||||
{
|
||||
$url = str_replace($this->getBasePath() . DIRECTORY_SEPARATOR, '', $path);
|
||||
if (mb_strpos($path, $this->getBasePath() . DIRECTORY_SEPARATOR) == 0) {
|
||||
$path = mb_substr($path, mb_strlen($this->getBasePath() . DIRECTORY_SEPARATOR));
|
||||
}
|
||||
|
||||
$this->stylesheets[] = trim($url, '/');
|
||||
$this->stylesheets[] = trim($path, '/');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user