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
F3527278: D25700.1744837506.diff
Tue, Apr 15, 21:05
F3489881: D25700.1744782576.diff
Tue, Apr 15, 05:49
F3397826: D25700.1744529462.diff
Sat, Apr 12, 07:31
F3372135: D25700.1744248529.diff
Wed, Apr 9, 01:28
F3368297: D25700.1744207481.diff
Tue, Apr 8, 14:04
F3353281: D25700.1743831575.diff
Fri, Apr 4, 05:39
F3353277: D25700.1743831488.diff
Fri, Apr 4, 05:38
F3350316: D25700.1743765472.diff
Thu, Apr 3, 11:17

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