1
1
Fork 0

check if BasePath is empty to prevent mangeled up CSS path

This commit is contained in:
Tobias Diekershoff 2019-03-30 11:13:27 +01:00
parent 1c2a77c47f
commit bb8216cbc8

View file

@ -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, '/');
}