Page MenuHomePhorge

Fix exception accessing a non-existing EditEngine
ClosedPublic

Authored by aklapper on Apr 19 2024, 10:58.
Tags
None
Referenced Files
F3701763: D25597.1745606810.diff
Thu, Apr 24, 18:46
F3685912: D25597.1745572765.diff
Thu, Apr 24, 09:19
F3583893: D25597.1745118904.diff
Sat, Apr 19, 03:15
F3447063: D25597.1744706705.diff
Mon, Apr 14, 08:45
F3374733: D25597.1744294962.diff
Wed, Apr 9, 14:22
F3368667: D25597.1744210322.diff
Tue, Apr 8, 14:52
F3368251: D25597.1744206961.diff
Tue, Apr 8, 13:56
F3368246: D25597.1744206903.diff
Tue, Apr 8, 13:55

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