Log database errors instead of showing them.

display_errors is off unless DISPLAY_ERRORS is set in .env.
This commit is contained in:
tim
2026-09-25 21:57:11 +02:00
parent bcba2e1ca3
commit f97bdecbc1
9 changed files with 40 additions and 16 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ if (isset($_SESSION['editor'])) {
$username = (string)($_POST['username'] ?? '');
$query = "SELECT * FROM $table WHERE username = ? LIMIT 1";
$getid = $db->execute_query($query, array($username)) or die("Query failed: ".$db->error);
$getid = $db->execute_query($query, array($username)) or db_fail();
$row = $getid->fetch_assoc();
$stored_password = '';