Log database errors instead of showing them.
display_errors is off unless DISPLAY_ERRORS is set in .env.
This commit is contained in:
+1
-1
@@ -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 = '';
|
||||
|
||||
Reference in New Issue
Block a user