Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14765908
D10361.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D10361.id.diff
View Options
diff --git a/src/applications/harbormaster/controller/HarbormasterBuildViewController.php b/src/applications/harbormaster/controller/HarbormasterBuildViewController.php
--- a/src/applications/harbormaster/controller/HarbormasterBuildViewController.php
+++ b/src/applications/harbormaster/controller/HarbormasterBuildViewController.php
@@ -126,17 +126,28 @@
$target_box->addPropertyList($properties, pht('Overview'));
- $description = $build_target->getBuildStep()->getDescription();
- if ($description) {
- $rendered = PhabricatorMarkupEngine::renderOneObject(
- id(new PhabricatorMarkupOneOff())
- ->setContent($description)
- ->setPreserveLinebreaks(true),
- 'default',
- $viewer);
-
- $properties->addSectionHeader(pht('Description'));
- $properties->addTextContent($rendered);
+ $step = $build_target->getBuildStep();
+
+ if ($step) {
+ $description = $step->getDescription();
+ if ($description) {
+ $rendered = PhabricatorMarkupEngine::renderOneObject(
+ id(new PhabricatorMarkupOneOff())
+ ->setContent($description)
+ ->setPreserveLinebreaks(true),
+ 'default',
+ $viewer);
+
+ $properties->addSectionHeader(pht('Description'));
+ $properties->addTextContent($rendered);
+ }
+ } else {
+ $target_box->setFormErrors(
+ array(
+ pht(
+ 'This build step has since been deleted on the build plan. '.
+ 'Some information may be omitted.'),
+ ));
}
$details = $build_target->getDetails();
diff --git a/src/applications/harbormaster/query/HarbormasterBuildTargetQuery.php b/src/applications/harbormaster/query/HarbormasterBuildTargetQuery.php
--- a/src/applications/harbormaster/query/HarbormasterBuildTargetQuery.php
+++ b/src/applications/harbormaster/query/HarbormasterBuildTargetQuery.php
@@ -103,7 +103,7 @@
foreach ($page as $target) {
$target->attachBuildStep(
- $steps[$target->getBuildStepPHID()]);
+ idx($steps, $target->getBuildStepPHID()));
}
}
diff --git a/src/applications/harbormaster/storage/build/HarbormasterBuildTarget.php b/src/applications/harbormaster/storage/build/HarbormasterBuildTarget.php
--- a/src/applications/harbormaster/storage/build/HarbormasterBuildTarget.php
+++ b/src/applications/harbormaster/storage/build/HarbormasterBuildTarget.php
@@ -117,7 +117,7 @@
return $this->assertAttached($this->build);
}
- public function attachBuildStep(HarbormasterBuildStep $step) {
+ public function attachBuildStep(HarbormasterBuildStep $step = null) {
$this->buildStep = $step;
return $this;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 24, 3:59 PM (20 h, 18 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7041504
Default Alt Text
D10361.id.diff (2 KB)
Attached To
Mode
D10361: Prevent crash when build step has been deleted on build plan
Attached
Detach File
Event Timeline
Log In to Comment