FIX: Fix initial dev/build on PDO Database.

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.
This commit is contained in:
Sam Minnee 2016-04-21 17:45:42 +12:00
parent 1ddf008592
commit b25ec97979
1 changed files with 1 additions and 1 deletions

View File

@ -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