diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-11-10 18:17:08 +0300 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-11-10 18:17:08 +0300 |
commit | 042bfabf646a1da5c64d1d29dde22829a311648b (patch) | |
tree | bfafcc776d885b6b4352592e7bf805c125ed9365 /lib/private/db.php | |
parent | e9ebbcb47e75213bc2ea0f62b94229cc089a6119 (diff) |
Ensure there is a connection object within \OC_DB::enableCaching()
Diffstat (limited to 'lib/private/db.php')
-rw-r--r-- | lib/private/db.php | 5 |
1 files 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(); } } |