Skip to content

Commit

Permalink
Add additional error checking to label handling (#1907)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
williamjallen authored Jan 2, 2024
1 parent daed32a commit d171b88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/cdash/xml_handlers/build_handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public function endElement($parser, $name)
} elseif ($name == 'LABEL' && $parent == 'LABELS') {
if (!empty($this->ErrorSubProjectName)) {
$this->SubProjectName = $this->ErrorSubProjectName;
} elseif (isset($this->Error)) {
} elseif (isset($this->Error) && $this->Error instanceof BuildFailure) {
$this->Error->AddLabel($this->Label);
} else {
$this->Labels[] = $this->Label;
Expand Down

0 comments on commit d171b88

Please sign in to comment.