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

Fix broken file PHID extraction that causes Pholio uploads to crash

Summary:
A commit earlier this year modified the structure of the file upload transaction data value, by nesting the array of file upload PHIDs in another array.
The `extractFilePHIDs` method was not updated to deal with that change though, therefore new mock uploads via Pholio would crash.
This patch fixes that method so it can process the updated transaction data.

Resolves T15105

Test Plan: Patched my live Phabricator installation with this fix and successfully uploaded new Pholio mockups.

Reviewers: O1 Blessed Committers, Cigaryno, Matthew

Reviewed By: O1 Blessed Committers, Cigaryno, Matthew

Subscribers: Matthew, speck, tobiaswiese, valerio.bozzolan, Cigaryno

Tags: #pholio

Maniphest Tasks: T15105

Differential Revision: https://we.phorge.it/D25058
This commit is contained in:
Thomas Iguchi 2022-11-11 13:06:34 -07:00 committed by Matthew Bowker
parent abb693962d
commit a8a38835e1

View file

@ -110,10 +110,12 @@ final class PholioImageFileTransaction
$new_phids = $value; $new_phids = $value;
$file_phids = array(); $file_phids = array();
foreach ($new_phids as $phid) { foreach ($new_phids as $phids) {
foreach ($phids as $phid) {
$file_phids[] = $editor->loadPholioImage($object, $phid) $file_phids[] = $editor->loadPholioImage($object, $phid)
->getFilePHID(); ->getFilePHID();
} }
}
return $file_phids; return $file_phids;
} }