@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make omitting "value" from a transaction description an explicit error

Summary: See PHI1710. Until D21044, some transactions could omit "value" and apply correctly. This now throws an exception when accessing `$xaction['value']`. All transactions are expected to have a "value" key, so require it explicitly rather than implicitly.

Test Plan: Submitted a transaction with a "type" but no "value". After D21044, got a language-level exception. After this change, got an explicit exception.

Differential Revision: https://secure.phabricator.com/D21176

+10
+10
src/applications/transactions/editengine/PhabricatorEditEngine.php
··· 2204 2204 $transactions_key, 2205 2205 $key)); 2206 2206 } 2207 + 2208 + if (!array_key_exists('value', $xaction)) { 2209 + throw new Exception( 2210 + pht( 2211 + 'Parameter "%s" must contain a list of transaction descriptions, '. 2212 + 'but item with key "%s" is missing a "value" field. Each '. 2213 + 'transaction must have a value field.', 2214 + $transactions_key, 2215 + $key)); 2216 + } 2207 2217 } 2208 2218 2209 2219 return $xactions;