]> source.dussan.org Git - nextcloud-server.git/commitdiff
Ensure there is a connection object within \OC_DB::enableCaching()
authorThomas Müller <thomas.mueller@tmit.eu>
Mon, 10 Nov 2014 15:17:08 +0000 (16:17 +0100)
committerThomas Müller <thomas.mueller@tmit.eu>
Mon, 10 Nov 2014 15:17:08 +0000 (16:17 +0100)
lib/private/db.php

index 93d8973d8c0f69ebd3dcbabe6802060bc7186744..d58f7c3ebcbf5e1ec11f69b91e662e7c47d8d85b 100644 (file)
@@ -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();
                }
        }