From aba98c73882fe950db67b767c083b93ce5ad3dd7 Mon Sep 17 00:00:00 2001 From: Nathaniel Catchpole Date: Mon, 3 Feb 2014 14:44:00 +0000 Subject: [PATCH] Issue #2186557 by andypost: DatabaseBackend::garbageCollection() should use injected database. --- core/lib/Drupal/Core/Cache/DatabaseBackend.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/lib/Drupal/Core/Cache/DatabaseBackend.php b/core/lib/Drupal/Core/Cache/DatabaseBackend.php index 5d6362e1fe4..4a9db05fe18 100644 --- a/core/lib/Drupal/Core/Cache/DatabaseBackend.php +++ b/core/lib/Drupal/Core/Cache/DatabaseBackend.php @@ -8,7 +8,6 @@ namespace Drupal\Core\Cache; use Drupal\Core\Database\Connection; -use Drupal\Core\Database\Database; use Drupal\Core\Database\SchemaObjectExistsException; /** @@ -311,7 +310,7 @@ class DatabaseBackend implements CacheBackendInterface { */ public function garbageCollection() { try { - Database::getConnection()->delete($this->bin) + $this->connection->delete($this->bin) ->condition('expire', Cache::PERMANENT, '<>') ->condition('expire', REQUEST_TIME, '<') ->execute();