Use namespaced DB helper in schema bootstrap

This commit is contained in:
Jeppe Bundgaard
2026-07-01 10:04:28 +02:00
parent 72bd22a707
commit a826153bb5
@@ -424,17 +424,17 @@ class edge_gateway_schema_bootstrap
private static function pdo(): \PDO
{
if (!class_exists('db', false)) {
if (!class_exists(db::class, false)) {
$dbClassPath = __DIR__ . '/../../../classes/db.php';
if (is_file($dbClassPath)) {
require_once $dbClassPath;
}
}
if (!class_exists('db')) {
if (!class_exists(db::class)) {
throw new \RuntimeException('Database connection helper is not available.');
}
return \db::getPDO();
return db::getPDO();
}
}