From b84e13f769d531a106903b6a801d86e74584f98d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A4=D1=91=D0=B4=D0=BE=D1=80=20=D0=9F=D0=BE=D0=B4=D0=BB?= =?UTF-8?q?=D0=B5=D1=81=D0=BD=D0=BE=D0=B2?= Date: Wed, 27 Jul 2016 18:11:33 +0300 Subject: [PATCH] =?UTF-8?q?Exception=20=D0=B5=D1=81=D0=BB=D0=B8=20=D0=BD?= =?UTF-8?q?=D0=B5=20=D0=B7=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8=D0=BB=D1=81?= =?UTF-8?q?=D1=8F=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/controller/controller.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/controller/controller.php b/core/controller/controller.php index 2d41f04..2f33bac 100644 --- a/core/controller/controller.php +++ b/core/controller/controller.php @@ -54,7 +54,11 @@ class Controller public function loadConfig($name) { $filename = Shortcut::getUrl('config', $name); - include($filename); + if (file_exists($filename)) { + include($filename); + } else { + throw new Exception('Невозможно загрузить файл настроек ' . $name); + } return $settings; }