Skip to content
Snippets Groups Projects
Commit 9770f228 authored by Ryan McVeigh's avatar Ryan McVeigh Committed by Brady
Browse files

Issue #3291891: Stats data variable name mismatch

parent 08672829
Branches
Tags 8.x-2.1
2 merge requests!30Issue #2971991 by amykhailova, code-drupal: "Cc" Recipient not receiving email...,!21Issue #3291891: Stats data variable name mismatch
......@@ -348,14 +348,14 @@ class Api {
];
// Lets try and retrieve the browser statistics.
$statsdata = $this->getResponse($path, $query);
$stats_data = $this->getResponse($path, $query);
if (!$stats_data) {
return [];
}
$data = [];
// Determine all browsers. Nested foreach to
// iterate over all data returned per aggregation.
foreach ($statsdata as $item) {
foreach ($stats_data as $item) {
foreach ($item->stats as $inneritem) {
if (array_key_exists($inneritem->name, $data)) {
$data[$inneritem->name] += $inneritem->metrics->opens;
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment