diff --git a/inc/context.php b/inc/context.php index 137f6ebd..a85f2f05 100644 --- a/inc/context.php +++ b/inc/context.php @@ -2,6 +2,7 @@ namespace Vichan; use Vichan\Data\Driver\CacheDriver; +use Vichan\Data\ReportQueries; defined('TINYBOARD') or exit; @@ -33,6 +34,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; } ]); }