1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Provide missing default attachment list for Files transactions

Summary: Ref T13682. This property may not exist, and should defualt to an empty array if not present.

Test Plan: Created a new object.

Maniphest Tasks: T13682

Differential Revision: https://secure.phabricator.com/D21834
This commit is contained in:
epriestley 2022-05-23 09:23:39 -07:00
parent cc44ae32c5
commit 8cd02e6727

View file

@ -2249,7 +2249,7 @@ abstract class PhabricatorApplicationTransactionEditor
foreach ($remarkup_changes as $remarkup_change) {
$metadata = $remarkup_change->getMetadata();
$attached_phids = idx($metadata, 'attachedFilePHIDs');
$attached_phids = idx($metadata, 'attachedFilePHIDs', array());
foreach ($attached_phids as $file_phid) {
$new_map[$file_phid] = PhabricatorFileAttachment::MODE_ATTACH;
}