Page MenuHomePhorge

Fix exception accessing a non-existing EditEngine
ClosedPublic

Authored by aklapper on Apr 19 2024, 10:58.
Tags
None
Referenced Files
F2977070: D25597.1739607168.diff
Fri, Feb 14, 08:12
F2977069: D25597.1739606991.diff
Fri, Feb 14, 08:09
F2962769: D25597.1739181931.diff
Sun, Feb 9, 10:05
F2944580: D25597.1738273104.diff
Wed, Jan 29, 21:38
F2943535: D25597.1738199588.diff
Wed, Jan 29, 01:13
F2942927: D25597.1738146744.diff
Tue, Jan 28, 10:32
F2938383: D25597.1737994397.diff
Sun, Jan 26, 16:13
F2936988: D25597.1737944699.diff
Sun, Jan 26, 02:24

Details

Summary

Trying to access a non-existing edit engine "foo" via the URI /transactions/editengine/foo/ throws an unhandled exception.
PhabricatorEditEngine::getByKey($viewer, $engine_key) is null as $engine_key is non-existing foo.
Thus avoid calling setViewer() on null by splitting into a separate step after a null check.
When null, show a proper 404 error instead.

EXCEPTION: (Error) Call to a member function setViewer() on null at [<phorge>/src/applications/transactions/controller/PhabricatorEditEngineConfigurationListController.php:17]

Closes T15793

Test Plan

While logged in and with sufficient permissions,

Diff Detail

Repository
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable