mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-05 12:21:02 +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();
|
self::endOutputCapture();
|
||||||
$access_log = self::getGlobal('log.access');
|
$access_log = self::getGlobal('log.access');
|
||||||
|
|
||||||
try {
|
if ($access_log) {
|
||||||
$access_log->setData(
|
// We may end up here before the access log is initialized, e.g. from
|
||||||
array(
|
// verifyPHP().
|
||||||
'c' => 500,
|
|
||||||
));
|
try {
|
||||||
$access_log->write();
|
$access_log->setData(
|
||||||
} catch (Exception $ex) {
|
array(
|
||||||
$message .= "\n(Moreover, unable to write to access log.)";
|
'c' => 500,
|
||||||
|
));
|
||||||
|
$access_log->write();
|
||||||
|
} catch (Exception $ex) {
|
||||||
|
$message .= "\n(Moreover, unable to write to access log.)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
header(
|
header(
|
||||||
|
|
Loading…
Reference in a new issue