]> git.mxchange.org Git - friendica.git/commitdiff
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 c0afd514d036068983afd1cf6c6b8a6f16b3f008..3408241a1ad65c161d0211d1fce2729b4c9b5316 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, '/');
        }