mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 11:30:55 +01:00
Fix startup issue with access log
Summary: Fixes T2930. We may not have an access log here yet -- I got a little too overeager with D5533. Test Plan: Faked gpc quotes and got a nice error instead of a blank screen: {F39821} Reviewers: btrahan, chad Reviewed By: chad CC: aran Maniphest Tasks: T2930 Differential Revision: https://secure.phabricator.com/D5630
This commit is contained in:
parent
46c7b46516
commit
0ad05e911b
1 changed files with 13 additions and 8 deletions
|
@ -191,14 +191,19 @@ final class PhabricatorStartup {
|
|||
self::endOutputCapture();
|
||||
$access_log = self::getGlobal('log.access');
|
||||
|
||||
try {
|
||||
$access_log->setData(
|
||||
array(
|
||||
'c' => 500,
|
||||
));
|
||||
$access_log->write();
|
||||
} catch (Exception $ex) {
|
||||
$message .= "\n(Moreover, unable to write to access log.)";
|
||||
if ($access_log) {
|
||||
// We may end up here before the access log is initialized, e.g. from
|
||||
// verifyPHP().
|
||||
|
||||
try {
|
||||
$access_log->setData(
|
||||
array(
|
||||
'c' => 500,
|
||||
));
|
||||
$access_log->write();
|
||||
} catch (Exception $ex) {
|
||||
$message .= "\n(Moreover, unable to write to access log.)";
|
||||
}
|
||||
}
|
||||
|
||||
header(
|
||||
|
|
Loading…
Reference in a new issue