@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Don't crash when failed to load configuration

Summary:
If the system can't load, we often have good error screens, but this check blocks them because the Config wasn't loaded.

Just skip the preconnect header if config is broken - probably most of the site isn't working anyway.

Fixes T16173.

Test Plan: remove php-curl, php-mbstring and php-mysql, restart server, see nicer error message with references to `apt-get` and `dnf`. It might be enough to remove just one of them.

Reviewers: aklapper, luca.itro, O1 Blessed Committers

Reviewed By: aklapper, O1 Blessed Committers

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16173

Differential Revision: https://we.phorge.it/D26576

Aviv Eyal 447c694c f5cb1445

+5 -1
+5 -1
src/aphront/response/AphrontHTMLResponse.php
··· 6 6 $headers = array( 7 7 array('Content-Type', 'text/html; charset=UTF-8'), 8 8 ); 9 - $cdn = PhabricatorEnv::getEnvConfig('security.alternate-file-domain'); 9 + try { 10 + $cdn = PhabricatorEnv::getEnvConfig('security.alternate-file-domain'); 11 + } catch (Throwable $ex) { 12 + $cdn = null; 13 + } 10 14 if ($cdn) { 11 15 $headers[] = array('Link', '<'.$cdn.'>; rel="preconnect"'); 12 16 }