From 13601d32f57b86215f06bad55aa6f3dc048be3e2 Mon Sep 17 00:00:00 2001
From: paul <paul@zom.bi>
Date: Sat, 25 Sep 2021 03:24:51 +0200
Subject: [PATCH] Enable production PHP settings

---
 conf/LocalSettings.php | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/conf/LocalSettings.php b/conf/LocalSettings.php
index f6a0646..2eec616 100644
--- a/conf/LocalSettings.php
+++ b/conf/LocalSettings.php
@@ -7,6 +7,17 @@ if ( !defined( 'MEDIAWIKI' ) ) {
     exit;
 }
 
+error_reporting(0);
+# Enable long error messages
+if (getenv("DEBUG")) {
+    $wgShowExceptionDetails = true;
+    $wgShowDBErrorBacktrace = true;
+    $wgShowSQLErrors = true;
+    error_reporting(E_ALL);
+    ini_set('display_errors', 1);
+    ini_set('display_startup_errors', '1');
+}
+
 ## Uncomment this to disable output compression
 # $wgDisableOutputCompression = true;
 
@@ -156,13 +167,6 @@ enableSemantics( getenv("SEMANTIC_URL") );
 # Set Subpages on
 $wgNamespacesWithSubpages[NS_MAIN] = 1;
 
-# Enable long error messages
-if (getenv("DEBUG")) {
-    $wgShowExceptionDetails = true;
-    $wgShowDBErrorBacktrace = true;
-    $wgShowSQLErrors = true;
-}
-
 #  Local configuration for MediaWiki
 ini_set( 'max_execution_time', 1000 );
 ini_set('memory_limit', '-1');