Add debugging support

This commit is contained in:
patrick 2025-02-16 05:55:51 +00:00
parent ec5697662a
commit 5b4f686444

View File

@ -31,7 +31,6 @@ include_once ('helper.inc.php');
// so we will set it in the code instead just to make sure
error_reporting(E_ALL);
ini_set('log_errors', 'On');
//ini_set('display_errors', 'Off');
// error_reporting( E_ALL ^ E_WARNING );
//error_reporting(E_ALL ^ E_WARNING ^ E_NOTICE ^ E_DEPRECATED);
@ -85,6 +84,11 @@ if (file_exists($prependdir . 'data/config.inc.php')) {
exit;
}
if (get_value_or_default(isset($DEBUG), false))
ini_set('display_errors', 'On');
else
ini_set('display_errors', 'Off');
$dsn = "mysql:host=db;dbname=$DBNAME;charset=utf8mb4";
$pdo = new PDO($dsn, $DBUSER, $DBPASS);