@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Prevent an error when the Drydock lease artifact does not exist

Summary: If a host artifact exists in a Harbormaster build, where the Drydock lease no longer exists, then an error will be raised because of the attempt to access an undefined index. This changes the code to use `idx()` so that it correctly returns null instead.

Test Plan: Tested in production.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: joshuaspence, Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D13074

J Rhodes e7e58582 8ea13f3c

+1 -1
+1 -1
src/applications/harbormaster/storage/build/HarbormasterBuildArtifact.php
··· 77 77 ->setViewer($viewer) 78 78 ->withIDs(array($data['drydock-lease'])) 79 79 ->execute(); 80 - $lease = $leases[$data['drydock-lease']]; 80 + $lease = idx($leases, $data['drydock-lease']); 81 81 82 82 return id(new PHUIObjectItemView()) 83 83 ->setObjectName(pht('Drydock Lease'))