Fix #488 extra hyphen when there is no subtitle

This commit is contained in:
Kijin Sung 2016-05-10 11:15:28 +09:00
parent 4b27a503b5
commit 9b374861be

View file

@ -874,9 +874,9 @@ class Context
}
if (count($vars))
{
$title = preg_replace_callback('/\\$(\w+)/', function($matches) use($vars) {
$title = trim(trim(preg_replace_callback('/\\$(\w+)/', function($matches) use($vars) {
return isset($vars[strtolower($matches[1])]) ? $vars[strtolower($matches[1])] : $matches[0];
}, $title);
}, $title), ' -'));
}
self::$_instance->site_title = $title;
}