diff --git a/lib/index b/lib/index index 03067e7..e322527 160000 --- a/lib/index +++ b/lib/index @@ -1 +1 @@ -Subproject commit 03067e70b1c30bf4f69aa6f18392279f2a6cca49 +Subproject commit e322527cf5aa76596edf1e5d1282886c4e88e9ed diff --git a/makai.php b/makai.php index 8568cc3..bdfdcb9 100644 --- a/makai.php +++ b/makai.php @@ -3,6 +3,7 @@ namespace Makai; use ErrorException; use Index\Autoloader; +use Index\Environment; use Index\Data\ConnectionFailedException; use Index\Data\MariaDB\MariaDBBackend; use Index\Data\MariaDB\MariaDBConnectionInfo; @@ -18,17 +19,10 @@ define('MKI_DIR_PUB', MKI_ROOT . '/public'); define('MKI_DIR_PAGES', MKI_ROOT . '/pages'); define('MKI_DIR_CONFIG', MKI_ROOT . '/config'); -if(MKI_DEBUG) { - ini_set('display_errors', 'on'); - error_reporting(-1); -} else { - ini_set('display_errors', 'off'); - error_reporting(0); -} - require_once MKI_DIR_LIB . '/index/index.php'; Autoloader::addNamespace(__NAMESPACE__, MKI_DIR_SRC); +Environment::setDebug(MKI_DEBUG); try { $dbConfig = parse_ini_file(MKI_DIR_CONFIG . DIRECTORY_SEPARATOR . 'database.ini');