Commit e666688a authored by gdd's avatar gdd

Exceptions now successfully being caught when db is missing

parent cc3d5edc
......@@ -3,6 +3,7 @@
namespace Drupal\Core\Config;
use Drupal\Core\Config\DrupalConfigVerifiedStorage;
use Exception;
/**
* Represents an SQL-based configuration storage object.
......@@ -18,7 +19,8 @@ public function read() {
// catch the exception and just return an empty array so the caller can
// handle it if need be.
try {
return db_query('SELECT data FROM {config} WHERE name = :name', array(':name' => $this->name))->fetchField();
$result = db_query('SELECT data FROM {config} WHERE name = :name', array(':name' => $this->name))->fetchField();
return $result;
} catch (Exception $e) {
return array();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment