From 042bfabf646a1da5c64d1d29dde22829a311648b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20M=C3=BCller?= Date: Mon, 10 Nov 2014 16:17:08 +0100 Subject: [PATCH] Ensure there is a connection object within \OC_DB::enableCaching() --- lib/private/db.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/private/db.php b/lib/private/db.php index 93d8973d8c0..d58f7c3ebcb 100644 --- a/lib/private/db.php +++ b/lib/private/db.php @@ -423,10 +423,11 @@ class OC_DB { * @param bool $enabled */ static public function enableCaching($enabled) { + $connection = self::getConnection(); if ($enabled) { - self::$connection->enableQueryStatementCaching(); + $connection->enableQueryStatementCaching(); } else { - self::$connection->disableQueryStatementCaching(); + $connection->disableQueryStatementCaching(); } } -- 2.39.5