mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-11 15:21:03 +01:00
Fix Pholio feed fatal
Summary: need to filter images that we can't find mocks for. Fixes T3645. Note I have some other errors in my feed which are really tricky to debug and might be garbage data; I want to see what happens in prod post this push. Test Plan: set a mock visibility to no one and feed worked Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T3645 Differential Revision: https://secure.phabricator.com/D6631
This commit is contained in:
parent
8d21dc0d52
commit
c6ae9c5672
1 changed files with 8 additions and 2 deletions
|
@ -138,8 +138,14 @@ final class PholioImageQuery
|
|||
->execute();
|
||||
$mocks = mpull($mocks, null, 'getID');
|
||||
}
|
||||
foreach ($images as $image) {
|
||||
$image->attachMock($mocks[$image->getMockID()]);
|
||||
foreach ($images as $index => $image) {
|
||||
$mock = idx($mocks, $image->getMockID());
|
||||
if ($mock) {
|
||||
$image->attachMock($mock);
|
||||
} else {
|
||||
// mock is missing or we can't see it
|
||||
unset($images[$index]);
|
||||
}
|
||||
}
|
||||
|
||||
return $images;
|
||||
|
|
Loading…
Reference in a new issue