Skip to content

Commit

Permalink
fix boolean to array deprecation notice when adding to report metadat…
Browse files Browse the repository at this point in the history
…a processedMetrics array
  • Loading branch information
diosmosis committed Sep 18, 2024
1 parent ff4aa13 commit c9d47e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions core/Plugin/Report.php
Original file line number Diff line number Diff line change
Expand Up @@ -1344,10 +1344,10 @@ private function isScopeSameOrSubsetOf(?string $scope, string $supersetScope): b
private function getProcessedMetricsMetadata(): array
{
$metadata = [
'names' => $this->getProcessedMetrics(),
'formulas' => null,
'temporaryMetricAggregationTypes' => null,
'temporaryMetricSemanticTypes' => null,
'names' => $this->getProcessedMetrics() ?: [],
'formulas' => [],
'temporaryMetricAggregationTypes' => [],
'temporaryMetricSemanticTypes' => [],
];

if (empty($this->processedMetrics)) {
Expand Down
2 changes: 1 addition & 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

0 comments on commit c9d47e3

Please sign in to comment.