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:
parent
58d0ee2de0
commit
7507981f22
1 changed files with 8 additions and 6 deletions
|
@ -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'];
|
||||
|
|
Loading…
Reference in a new issue