Fix file PHID extraction in Pholio
Summary: Ref T13682. After some change prior change likely connected to T13682, file PHIDs fail to extract properly in Pholio. Test Plan: - Created a new Pholio mock with at least one image. - Before: fatal when extracting data from this datastructure. - After: clean mock creation. Maniphest Tasks: T13682 Differential Revision: https://secure.phabricator.com/D21858
This commit is contained in:
parent
9426765a2c
commit
a83cb99e85
|
@ -107,11 +107,18 @@ final class PholioImageFileTransaction
|
|||
// including old file PHIDs) because we currently don't have a storage
|
||||
// object when called. This might change at some point.
|
||||
|
||||
$new_phids = $value;
|
||||
$image_changes = $value;
|
||||
|
||||
$image_phids = array();
|
||||
foreach ($image_changes as $change_type => $phids) {
|
||||
foreach ($phids as $phid) {
|
||||
$image_phids[$phid] = $phid;
|
||||
}
|
||||
}
|
||||
|
||||
$file_phids = array();
|
||||
foreach ($new_phids as $phid) {
|
||||
$file_phids[] = $editor->loadPholioImage($object, $phid)
|
||||
foreach ($image_phids as $image_phid) {
|
||||
$file_phids[] = $editor->loadPholioImage($object, $image_phid)
|
||||
->getFilePHID();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue