Fix HTTP 500 on live after login, unify database config in config.php, sanitize env example, and harden pentest security
This commit is contained in:
+14
-8
@@ -29,14 +29,20 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action']) && $_POST['
|
||||
}
|
||||
|
||||
// Haal alle sessies op
|
||||
$stmtSessions = $db->query("
|
||||
SELECT s.*, u.name as creator_name,
|
||||
(SELECT COUNT(*) FROM brainstorm_cards WHERE session_id = s.id) as cards_count
|
||||
FROM brainstorm_sessions s
|
||||
JOIN users u ON s.created_by_id = u.id
|
||||
ORDER BY s.created_at DESC
|
||||
");
|
||||
$sessions = $stmtSessions->fetchAll();
|
||||
$sessions = [];
|
||||
try {
|
||||
$stmtSessions = $db->query("
|
||||
SELECT s.*, u.name as creator_name,
|
||||
(SELECT COUNT(*) FROM brainstorm_cards WHERE session_id = s.id) as cards_count
|
||||
FROM brainstorm_sessions s
|
||||
JOIN users u ON s.created_by_id = u.id
|
||||
ORDER BY s.created_at DESC
|
||||
");
|
||||
$sessions = $stmtSessions->fetchAll() ?: [];
|
||||
} catch (Throwable $e) {
|
||||
error_log("Fout bij ophalen brainstorm sessies: " . $e->getMessage());
|
||||
ensure_tables_exist($db);
|
||||
}
|
||||
require_once __DIR__ . '/includes/header.php';
|
||||
?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user