Hotfix for App->registerStylesheet

- Wrong condition for strpos()
- Follow-up to #6953
This commit is contained in:
Hypolite Petovan 2019-03-31 06:00:20 -04:00 committed by GitHub
parent e5cc35cb45
commit 3de1fc3097
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -182,8 +182,8 @@ class App
*/
public function registerStylesheet($path)
{
if (mb_strpos($path, $this->getBasePath() . DIRECTORY_SEPARATOR) == 0) {
$path = mb_substr($path, mb_strlen($this->getBasePath() . DIRECTORY_SEPARATOR));
if (mb_strpos($path, $this->getBasePath() . DIRECTORY_SEPARATOR) === 0) {
$path = mb_substr($path, mb_strlen($this->getBasePath() . DIRECTORY_SEPARATOR));
}
$this->stylesheets[] = trim($path, '/');