Fix two minor issues with Pholio
Summary: - One bad method call. - One fatal when handling a mock with no images. These "can't" exist, but we have a few old ones I think and it's probably better not to fatal. We could filter the object out completely, but this doesn't seem like a bad fix? Test Plan: Viewed `/pholio/` (although I don't think I have any imageless mocks) and viewed an outdated image. Reviewers: btrahan, chad Reviewed By: chad CC: aran Differential Revision: https://secure.phabricator.com/D6574
This commit is contained in:
@@ -134,7 +134,7 @@ final class PholioMockViewController extends PholioController {
|
||||
$image = idx($images, $image_id);
|
||||
|
||||
if ($image) {
|
||||
$history = $mock->getImageUpdateSet($image_id);
|
||||
$history = $mock->getImageHistorySet($image_id);
|
||||
$latest_image = last($history);
|
||||
$href = $this->getApplicationURI(
|
||||
'image/history/'.$latest_image->getID().'/');
|
||||
|
||||
Reference in New Issue
Block a user