Prevent buildable list in Harbormaster from breaking when container or buildables are missing
Summary: Ref T1049. I'm fair sure this is just a case of bad data in my local install, but we probably don't want the default page for Harbormaster to break when there's invalid / missing container or buildable handles on any of the builds. Test Plan: Loaded the page, didn't get a crash due to null reference. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: demo, epriestley, Korvin Maniphest Tasks: T1049 Differential Revision: https://secure.phabricator.com/D8608
This commit is contained in:
		| @@ -37,8 +37,12 @@ final class HarbormasterBuildableListController | ||||
|  | ||||
|       $item = id(new PHUIObjectItemView()) | ||||
|         ->setHeader(pht('Buildable %d', $buildable->getID())); | ||||
|       $item->addAttribute($buildable->getContainerHandle()->getName()); | ||||
|       $item->addAttribute($buildable->getBuildableHandle()->getFullName()); | ||||
|       if ($buildable->getContainerHandle() !== null) { | ||||
|         $item->addAttribute($buildable->getContainerHandle()->getName()); | ||||
|       } | ||||
|       if ($buildable->getBuildableHandle() !== null) { | ||||
|         $item->addAttribute($buildable->getBuildableHandle()->getFullName()); | ||||
|       } | ||||
|  | ||||
|       if ($id) { | ||||
|         $item->setHref("/B{$id}"); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 James Rhodes
					James Rhodes