1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Don't fatal with inaccessible database

Test Plan: Disable `mysql_connect()`.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran

Differential Revision: https://secure.phabricator.com/D2137
This commit is contained in:
vrana 2012-04-07 10:09:19 -07:00
parent 58d0ee2de0
commit 7507981f22

View file

@ -563,14 +563,16 @@ class AphrontDefaultApplicationConfiguration
if ($file) {
if (isset($callsigns[$lib])) {
$attrs = array(
'href' => $user->loadEditorLink(
$attrs = array('title' => $file);
try {
$attrs['href'] = $user->loadEditorLink(
'/src/'.$relative,
$part['line'],
$callsigns[$lib]),
'title' => $file,
);
if (!$attrs['href']) {
$callsigns[$lib]);
} catch (Exception $ex) {
// The database can be inaccessible.
}
if (empty($attrs['href'])) {
$attrs['href'] = sprintf($path, $callsigns[$lib]).
str_replace(DIRECTORY_SEPARATOR, '/', $relative).
'$'.$part['line'];