check if BasePath is empty to prevent mangeled up CSS path
This commit is contained in:
parent
1c2a77c47f
commit
bb8216cbc8
1 changed files with 5 additions and 1 deletions
|
@ -182,7 +182,11 @@ class App
|
|||
*/
|
||||
public function registerStylesheet($path)
|
||||
{
|
||||
$url = str_replace($this->getBasePath() . DIRECTORY_SEPARATOR, '', $path);
|
||||
if (!empty($this->getBasePath())) {
|
||||
$url = str_replace($this->getBasePath() . DIRECTORY_SEPARATOR, '', $path);
|
||||
} else {
|
||||
$url = $path;
|
||||
}
|
||||
|
||||
$this->stylesheets[] = trim($url, '/');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue