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
F4077630: D25700.1746889995.diff
Fri, May 9, 15:13
F4011565: D25700.1746626149.diff
Tue, May 6, 13:55
F3970344: D25700.1746528051.diff
Mon, May 5, 10:40
F3777226: D25700.1745877787.diff
Sun, Apr 27, 22:03
F3776483: D25700.1745861509.diff
Sun, Apr 27, 17:31
F3762270: D25700.1745832644.diff
Sun, Apr 27, 09:30
F3746369: D25700.1745768297.diff
Sat, Apr 26, 15:38
F3604943: D25700.1745246018.diff
Sun, Apr 20, 14:33

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