From 8cd02e6727e358bc1524890ddd2acb174ef35a64 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 23 May 2022 09:23:39 -0700 Subject: [PATCH] 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 --- .../transactions/editor/PhabricatorApplicationTransactionEditor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php index b753c0429a..ba58cbe287 100644 --- a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php +++ b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php @@ -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; } -- 2.11.4.GIT