From: Thomas Müller Date: Mon, 10 Nov 2014 15:17:08 +0000 (+0100) Subject: Ensure there is a connection object within \OC_DB::enableCaching() X-Git-Tag: v7.0.4RC1~40^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=042bfabf646a1da5c64d1d29dde22829a311648b;p=nextcloud-server.git Ensure there is a connection object within \OC_DB::enableCaching() --- 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(); } }