From 410e4a27a2f75b1010d7262569cee629f25f7f69 Mon Sep 17 00:00:00 2001 From: root <fadhilimamk@gmail.com> Date: Tue, 3 Oct 2017 00:40:33 +0700 Subject: [PATCH] Hide error when not in development environment --- public/index.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/public/index.php b/public/index.php index 3496c60..24fcb56 100644 --- a/public/index.php +++ b/public/index.php @@ -1,7 +1,11 @@ <?php - error_reporting(E_ALL); - ini_set('display_errors', 1); + $env = getenv('DAGOJEK_ENV'); + if (!$env || $env == "development") { + $env = "development"; + error_reporting(E_ALL); + ini_set('display_errors', 1); + } require __DIR__.'/../src/app.php'; -- GitLab