Added error if an invalid theme is found.

pull/624/head
damian 2018-08-19 17:16:04 +10:00
parent 1ef530ca46
commit d2d03eb60b
1 changed files with 5 additions and 0 deletions

5
src/bootstrap.php Normal file → Executable file
View File

@ -72,6 +72,11 @@ $router = new psm\Router();
// this may seem insignificant, but right now lots of functions depend on the following global var definition:
$db = $router->getService('db');
// check if we have a valid theme, error if we don't
if (!file_exists(PSM_PATH_SRC.'templates/'.PSM_THEME)) {
trigger_error("Selected theme '".PSM_THEME."' does not exist in templates folder. Please check your config.php for your PSM_THEME, set back to 'default' if unsure.", E_USER_ERROR);
}
// sanity check!
if (!defined('PSM_INSTALL') || !PSM_INSTALL) {
if ($db->getDbHost() === null) {