Page MenuHomePhorge

Fix exception accessing a non-existing EditEngine
ClosedPublic

Authored by aklapper on Apr 19 2024, 10:58.
Tags
None
Referenced Files
F3298409: D25597.1743001467.diff
Tue, Mar 25, 15:04
F3289950: D25597.1742856351.diff
Sun, Mar 23, 22:45
F3289407: D25597.1742846318.diff
Sun, Mar 23, 19:58
F3289403: D25597.1742846270.diff
Sun, Mar 23, 19:57
F3268971: D25597.1742520596.diff
Thu, Mar 20, 01:29
F3249454: D25597.1742286182.diff
Mon, Mar 17, 08:23
F3220618: D25597.1741811278.diff
Tue, Mar 11, 20:27
F3216814: D25597.1741716455.diff
Mon, Mar 10, 18:07

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