Add default value for config.sitename in App::initHead
authorPhilipp <admin+Github@philipp.info>
Mon, 4 Mar 2019 12:54:51 +0000 (07:54 -0500)
committerGitHub <noreply@github.com>
Mon, 4 Mar 2019 12:54:51 +0000 (07:54 -0500)
- Protect $this->page['title'] even more

Co-Authored-By: MrPetovan <hypolite@mrpetovan.com>
src/App.php

index cfb04ef..b3eed92 100644 (file)
@@ -576,7 +576,7 @@ class App
                }
 
                // Prepend the sitename to the page title
-               $this->page['title'] = $this->config->get('config', 'sitename') . ($this->page['title'] ? ' | ' . $this->page['title'] : '');
+               $this->page['title'] = $this->config->get('config', 'sitename', '') . (!empty($this->page['title']) ? ' | ' . $this->page['title'] : '');
 
                if (!empty(Core\Renderer::$theme['stylesheet'])) {
                        $stylesheet = Core\Renderer::$theme['stylesheet'];