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
F3335119: D25700.1743558512.diff
Tue, Apr 1, 01:48
F3330720: D25700.1743493092.diff
Mon, Mar 31, 07:38
F3327687: D25700.1743443675.diff
Sun, Mar 30, 17:54
F3314524: D25700.1743230749.diff
Fri, Mar 28, 06:45
F3311736: D25700.1743207446.diff
Fri, Mar 28, 00:17
F3310154: D25700.1743190522.diff
Thu, Mar 27, 19:35
F3308054: D25700.1743158899.diff
Thu, Mar 27, 10:48
F3304266: D25700.1743095064.diff
Wed, Mar 26, 17:04

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