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,6 +191,10 @@ final class PhabricatorStartup {
|
|||
self::endOutputCapture();
|
||||
$access_log = self::getGlobal('log.access');
|
||||
|
||||
if ($access_log) {
|
||||
// We may end up here before the access log is initialized, e.g. from
|
||||
// verifyPHP().
|
||||
|
||||
try {
|
||||
$access_log->setData(
|
||||
array(
|
||||
|
@ -200,6 +204,7 @@ final class PhabricatorStartup {
|
|||
} catch (Exception $ex) {
|
||||
$message .= "\n(Moreover, unable to write to access log.)";
|
||||
}
|
||||
}
|
||||
|
||||
header(
|
||||
'Content-Type: text/plain; charset=utf-8',
|
||||
|
|
Loading…
Reference in a new issue