From e18f5e513044643c4c0f806885fb713ed43639a3 Mon Sep 17 00:00:00 2001 From: Zankaria Date: Tue, 26 Nov 2024 00:34:03 +0100 Subject: [PATCH] context.php: add PDO to context --- inc/context.php | 6 ++++++ 1 file changed, 6 insertions(+) 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; } ]); }