Use namespaced DB helper in schema bootstrap
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user