From: Tobias Diekershoff Date: Sat, 30 Mar 2019 10:13:27 +0000 (+0100) Subject: check if BasePath is empty to prevent mangeled up CSS path X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bb8216cbc856867929a9c94557781f5b63b83b5f;p=friendica.git check if BasePath is empty to prevent mangeled up CSS path --- diff --git a/src/App.php b/src/App.php index c0afd514d0..3408241a1a 100644 --- a/src/App.php +++ b/src/App.php @@ -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, '/'); }