diff --git a/inc/context.php b/inc/context.php index ee8dce7d..26e9f861 100644 --- a/inc/context.php +++ b/inc/context.php @@ -86,6 +86,12 @@ function build_context(array $config): Context { CacheDriver::class => function($c) { // Use the global for backwards compatibility. return \cache::getCache(); + }, + \PDO::class => function($c) { + global $pdo; + // Ensure the PDO is initialized. + sql_open(); + return $pdo; } ]); }