Skip to content

Commit 9596f85

Browse files
author
Sander van Dragt
committed
Fix bug where php error reporting information was not respected (even on production) by introducing a DEBUG_ENABLED configuartion constant
1 parent d321c70 commit 9596f85

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

config.php

+1
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@
3131
// If URL-Rewriting works, then leave the line below as is
3232
define('BASE_PATH',BASE_DIR);
3333
define('SITE_TITLE', 'Your Site');
34+
// define('DEBUG_ENABLED', true);

index.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,11 @@
4040
include_once ROOT.DS.'controllers'.DS.'helpers.php';
4141
/* Debug Mode */
4242

43-
error_reporting(E_ALL);
44-
ini_set('display_errors','On');
43+
if (defined('DEBUG_ENABLED')) {
44+
error_reporting(E_ALL);
45+
ini_set('display_errors','On');
46+
47+
}
4548

4649
/* Basic Bootstrapping */
4750

0 commit comments

Comments
 (0)