Add SportPath auth APIs and training content foundation
This commit is contained in:
@@ -25,8 +25,7 @@ class Database {
|
||||
$this->connection->query("SET time_zone = '+00:00'");
|
||||
} catch (Throwable $e) {
|
||||
error_log('Database initialization failed: ' . $e->getMessage());
|
||||
http_response_code(500);
|
||||
die(json_encode(['error' => 'Database connection failed']));
|
||||
throw new RuntimeException('Database connection failed', 0, $e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,6 +108,8 @@ class Database {
|
||||
// Prevent cloning
|
||||
final class SingletonDatabase extends Database {
|
||||
private function __clone() {}
|
||||
private function __wakeup() {}
|
||||
public function __wakeup() {
|
||||
throw new LogicException('Database singleton cannot be unserialized');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user