From f249d57a020237ff236c3faaf3f947475f01f071 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Sat, 30 Jan 2021 14:43:12 +0800 Subject: [PATCH] redirect to install page before call config() --- include/core.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/include/core.php b/include/core.php index bcbe8233..589f794a 100644 --- a/include/core.php +++ b/include/core.php @@ -10,10 +10,6 @@ if (!empty($_SERVER['HTTP_X_REQUEST_ID'])) { } else { define('REQUEST_ID', intval(NEXUS_START * 10000)); } -ini_set('date.timezone', config('nexus.timezone')); -ini_set('error_reporting', E_ALL); -ini_set('display_errors', 0); - if (!file_exists($rootpath . '.env')) { $installScriptRelativePath = 'install/install.php'; $installScriptFile = $rootpath . "public/$installScriptRelativePath"; @@ -22,7 +18,9 @@ if (!file_exists($rootpath . '.env')) { exit(0); } } - +ini_set('date.timezone', config('nexus.timezone')); +ini_set('error_reporting', E_ALL); +ini_set('display_errors', 0); require $rootpath . 'vendor/autoload.php'; require $rootpath . 'nexus/Database/helpers.php';