Page MenuHomePhorge

Fix legacy crash when visiting Motivator backend as anon
ClosedPublic

Authored by valerio.bozzolan on Jun 26 2024, 21:10.
Tags
None
Referenced Files
F2943667: D25700.1738213432.diff
Wed, Jan 29, 05:03
F2938608: D25700.1738020155.diff
Sun, Jan 26, 23:22
F2936488: D25700.1737923759.diff
Sat, Jan 25, 20:35
F2934703: D25700.1737798594.diff
Fri, Jan 24, 09:49
F2932745: D25700.1737743313.diff
Thu, Jan 23, 18:28
F2932741: D25700.1737743311.diff
Thu, Jan 23, 18:28
F2932676: D25700.1737742060.diff
Thu, Jan 23, 18:07
F2932675: D25700.1737742024.diff
Thu, Jan 23, 18:07

Details

Summary

Now anonymous people can visit this page:

http://phorge.localhost/home/menu/new/custom/motivator/

And you do not see anymore this crash:

Undefined variable $custom_phid
phorge	applications/search/engine/PhabricatorProfileMenuEngine.php : 61	PhutilErrorHandler::handleError()
phorge	applications/search/engine/PhabricatorProfileMenuEngine.php : 916	PhabricatorProfileMenuEngine::getEditModeCustomPHID()
phorge	applications/search/engine/PhabricatorProfileMenuEngine.php : 269	PhabricatorProfileMenuEngine::buildItemNewContent()
phorge	applications/home/controller/PhabricatorHomeMenuItemController.php : 39	PhabricatorProfileMenuEngine::buildResponse()
phorge	aphront/configuration/AphrontApplicationConfiguration.php : 284	PhabricatorHomeMenuItemController::handleRequest()
phorge	aphront/configuration/AphrontApplicationConfiguration.php : 203	AphrontApplicationConfiguration::processRequest()

Closes T15867

Test Plan

Visit the mentioned page as logged-in. It still works.

Visit the mentioned page as logged-out. No crash anymore. You are redirected to the login page.

Diff Detail

Repository
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable