1
0
Fork 0
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:
epriestley 2013-04-09 11:27:37 -07:00
parent 46c7b46516
commit 0ad05e911b

View file

@ -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',