From b50d0cd710bb7fc16f1b3a182deb9bd95a30388b Mon Sep 17 00:00:00 2001 From: slawkens Date: Tue, 16 Oct 2018 01:34:48 +0200 Subject: [PATCH] Throw an exception if template index file cannot be found --- system/template.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/system/template.php b/system/template.php index 56c95d9f..8be77608 100644 --- a/system/template.php +++ b/system/template.php @@ -46,6 +46,9 @@ else { $template_name = 'kathrine'; $template_path = 'templates/' . $template_name; $template_index = 'template.php'; + if(!file_exists(BASE . $template_path . '/' . $template_index)) { + throw new RuntimeException('Cannot load any template. Please ensure your templates directory is not empty, and you set correct name for template in configuration.'); + } } if(file_exists(BASE . $template_path . '/config.php')) {