Skip to content

Commit

Permalink
debug build failure
Browse files Browse the repository at this point in the history
  • Loading branch information
diosmosis committed Sep 18, 2024
1 parent ff4aa13 commit 5714739
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/Goals/Goals.php
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ public function getReportMetadataEnd(&$reports, $info)
continue;
}

if (empty($apiReportToUpdate)) { // TODO: remove after done debugging
if (!is_array($apiReportToUpdate)) { // TODO: remove after done debugging
throw new \Exception("found empty report at $index");
}

Expand Down Expand Up @@ -410,6 +410,9 @@ public function getReportMetadataEnd(&$reports, $info)
foreach ($extraProcessedMetrics as $metric) {
$name = $metric->getName();

if (!is_array($apiReportToUpdate)) { // TODO: remove after done debugging
throw new \Exception("2 found empty report at $index");
}
$apiReportToUpdate['processedMetrics'][$name] = $metric->getTranslatedName();
$apiReportToUpdate['metricTypes'][$name] = $metric->getSemanticType() ?: 'unspecified';
$apiReportToUpdate['processedMetricFormulas'][$name] = $metric->getFormula();
Expand Down

0 comments on commit 5714739

Please sign in to comment.