fix undefined array index warning

This commit is contained in:
Tobias Mädel
2019-06-17 18:42:57 +02:00
committed by GitHub
parent 9e422756f9
commit a311be9dd2

View File

@@ -68,6 +68,12 @@ class DXCC extends CI_Model {
}
// update stats
if (!isset($results[$row->COL_COUNTRY]))
$results[$row->COL_COUNTRY] = [];
if (!isset($results[$row->COL_COUNTRY][$row->COL_BAND]))
$results[$row->COL_COUNTRY][$row->COL_BAND] = 0;
$results[$row->COL_COUNTRY][$row->COL_BAND] += $row->cnt;
}