Skip to content

Commit d171b88

Browse files
Add additional error checking to label handling (Kitware#1907)
CDash currently fails during the submission process if a label is applied to something other than a build failure. This PR adds additional checking, which allows the submission process to continue when labels are applied to invalid elements.
1 parent daed32a commit d171b88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/cdash/xml_handlers/build_handler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ public function endElement($parser, $name)
280280
} elseif ($name == 'LABEL' && $parent == 'LABELS') {
281281
if (!empty($this->ErrorSubProjectName)) {
282282
$this->SubProjectName = $this->ErrorSubProjectName;
283-
} elseif (isset($this->Error)) {
283+
} elseif (isset($this->Error) && $this->Error instanceof BuildFailure) {
284284
$this->Error->AddLabel($this->Label);
285285
} else {
286286
$this->Labels[] = $this->Label;

0 commit comments

Comments
 (0)