From 18a1178e4b93607a350259679e0366cb83fb4126 Mon Sep 17 00:00:00 2001 From: slawkens Date: Sun, 14 Dec 2025 10:20:59 +0100 Subject: [PATCH] Fix exception show on first install, when there is no vendor Before it displayed 500 white page, now it display the exception --- common.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/common.php b/common.php index de7a9bfd..fdfd35bd 100644 --- a/common.php +++ b/common.php @@ -148,16 +148,16 @@ if(!IS_CLI) { /** @var array $config */ ini_set('log_errors', 1); -if(@$config['env'] === 'dev' || defined('MYAAC_INSTALL')) { - ini_set('display_errors', 1); - ini_set('display_startup_errors', 1); - error_reporting(E_ALL); -} -else { +if(isset($config['env']) && $config['env'] !== 'dev' && !defined('MYAAC_INSTALL')) { ini_set('display_errors', 0); ini_set('display_startup_errors', 0); error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT); } +else { + ini_set('display_errors', 1); + ini_set('display_startup_errors', 1); + error_reporting(E_ALL); +} $autoloadFile = VENDOR . 'autoload.php'; if (!is_file($autoloadFile)) {