1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 09:12:41 +01:00

Allow config get to work when db is not functional

Summary: Fixes T6554.

Test Plan:
Run `bin/config get mysql.host` when no db is functional. Should not get an exception, but should see:
```
lang=json
{
  "config" : [
    {
      "key"       : "mysql.host",
      "source"    : "local",
      "value"     : null,
      "status"    : "unset",
      "errorInfo" : null
    },
    {
      "key"       : "mysql.host",
      "source"    : "database",
      "value"     : null,
      "status"    : "error",
      "errorInfo" : "Database source is not configured properly"
    }
  ]
}
```

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Maniphest Tasks: T6554

Differential Revision: https://secure.phabricator.com/D10851
This commit is contained in:
Scott Kroll 2014-11-14 09:12:20 -08:00 committed by epriestley
parent b85283105e
commit 84f741f408

View file

@ -59,8 +59,8 @@ final class PhabricatorConfigManagementGetWorkflow
);
}
$database_config = new PhabricatorConfigDatabaseSource('default');
try {
$database_config = new PhabricatorConfigDatabaseSource('default');
$database_value = $database_config->getKeys(array($key));
if (empty($database_value)) {
$values['database'] = array(