Skip to content

Commit

Permalink
debug warning in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
diosmosis committed Sep 17, 2024
1 parent 8dc1ed2 commit 3cf3c98
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/Goals/Goals.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ public function getReportMetadataEnd(&$reports, $info)

$reportsWithGoals = self::getAllReportsWithGoalMetrics();

foreach ($reports as &$apiReportToUpdate) {
foreach ($reports as $index => &$apiReportToUpdate) {
$reportHasGoals = false;
foreach ($reportsWithGoals as $reportWithGoals) {
if (
Expand All @@ -327,6 +327,10 @@ public function getReportMetadataEnd(&$reports, $info)
continue;
}

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

// collect extra metrics and processed metrics
$extraProcessedMetrics = [
new \Piwik\Plugins\Goals\Columns\Metrics\RevenuePerVisit($allIdGoals),
Expand Down

0 comments on commit 3cf3c98

Please sign in to comment.