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
@@ -60,7 +60,7 @@ function display_img($id) {
}
$query = "SELECT img, mime FROM $table WHERE 1 AND ID = ?".$hidden." LIMIT 0, 1";
$result = $db->execute_query($query, array((int)$id)) or die("Query failed : ".$db->error);
$result = $db->execute_query($query, array((int)$id)) or db_fail();
$row = $result->fetch_assoc();
if ($row) {