From b25ec9797937088ba28e95f4177707c4f8f7191e Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Thu, 21 Apr 2016 17:45:42 +1200 Subject: [PATCH] FIX: Fix initial dev/build on PDO Database. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the database isn’t yet created, $current is set, but $current->currentDatabase() is empty. I suspect this only applies to PDO connections. It results in errors during startup. This check fixes it. --- code/search/SearchUpdater.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/search/SearchUpdater.php b/code/search/SearchUpdater.php index 4acd075..0c836f0 100644 --- a/code/search/SearchUpdater.php +++ b/code/search/SearchUpdater.php @@ -22,7 +22,7 @@ class SearchUpdater extends Object global $databaseConfig; $current = DB::getConn(); - if (!$current || @$current->isManipulationCapture) { + if (!$current || !$current->currentDatabase() || @$current->isManipulationCapture) { return; } // If not yet set, or its already captured, just return