Skip to content

Commit

Permalink
can set MTT_DEBUG constant in config file
Browse files Browse the repository at this point in the history
  • Loading branch information
maxpozdeev committed Jan 8, 2024
1 parent 454eef2 commit 700e58e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
define('MTT_THEME_PATH', MTT_CONTENT_PATH. MTT_THEME. '/');


if (getenv('MTT_ENABLE_DEBUG') == 'YES' && !defined('MTT_DEBUG')) {
define('MTT_DEBUG', true);
if (getenv('MTT_ENABLE_DEBUG') == 'YES' || (defined('MTT_DEBUG') && MTT_DEBUG) ) {
if (!defined('MTT_DEBUG')) define('MTT_DEBUG', true);
error_reporting(E_ALL);
ini_set('display_errors', '1');
ini_set('log_errors', '1');
}
else if (!defined('MTT_DEBUG')) {
else {
//ini_set('display_errors', '0');
//ini_set('log_errors', '1');
define('MTT_DEBUG', false);
if (!defined('MTT_DEBUG')) define('MTT_DEBUG', false);
}

require_once(MTTINC. 'common.php');
Expand Down

0 comments on commit 700e58e

Please sign in to comment.