From 1e8198635e2378251888a09b6c98f0da7e1f6b0d Mon Sep 17 00:00:00 2001 From: slawkens Date: Thu, 30 May 2024 12:00:26 +0200 Subject: [PATCH] Enable dev mode on install, prevent noobs asking white page questions --- common.php | 2 +- install/index.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common.php b/common.php index 90b8d1e6..2057e972 100644 --- a/common.php +++ b/common.php @@ -156,7 +156,7 @@ if (file_exists(BASE . 'config.local.php')) { /** @var array $config */ ini_set('log_errors', 1); -if(@$config['env'] === 'dev') { +if(@$config['env'] === 'dev' || defined('MYAAC_INSTALL')) { ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); diff --git a/install/index.php b/install/index.php index d6043d42..6536829e 100644 --- a/install/index.php +++ b/install/index.php @@ -3,9 +3,9 @@ use Twig\Environment as Twig_Environment; use Twig\Loader\FilesystemLoader as Twig_FilesystemLoader; -require '../common.php'; +const MYAAC_INSTALL = true; -define('MYAAC_INSTALL', true); +require '../common.php'; // includes require SYSTEM . 'functions.php';