Fix terminate 500: require DatabaseManager before calling drop

AccountManager::terminate() called DatabaseManager::drop() without
requiring the class first — fatal class not found error on every
account termination.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 05:45:33 +00:00
parent 892034d3a7
commit b9c37030b6
+1
View File
@@ -87,6 +87,7 @@ class AccountManager {
}
public static function terminate(int $acctId): void {
require_once NOVACPX_LIB . '/DatabaseManager.php';
$db = DB::getInstance();
$acct = $db->fetchOne("SELECT * FROM accounts WHERE id = ?", [$acctId]);
if (!$acct) throw new RuntimeException("Account not found");