check if BasePath is empty to prevent mangeled up CSS path
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Sat, 30 Mar 2019 10:13:27 +0000 (11:13 +0100)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Sat, 30 Mar 2019 10:13:27 +0000 (11:13 +0100)
src/App.php

index c0afd51..3408241 100644 (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, '/');
        }