diff --git a/GAFeed.lib.inc b/GAFeed.lib.inc index 7e74421..1dc6a38 100644 --- a/GAFeed.lib.inc +++ b/GAFeed.lib.inc @@ -381,7 +381,7 @@ class GAFeed { */ protected function sanitizeReport() { /* Named keys for report values */ - $this->results->rawRows = $this->results->rows; + $this->results->rawRows = isset($this->results->rows) ? $this->results->rows : array(); $this->results->rows = array(); foreach ($this->results->rawRows as $row_key => $row_value) { foreach ($row_value as $item_key => $item_value) { diff --git a/google_analytics_views/plugins/google_analytics_plugin_query_google_analytics.inc b/google_analytics_views/plugins/google_analytics_plugin_query_google_analytics.inc index aada21d..b706099 100644 --- a/google_analytics_views/plugins/google_analytics_plugin_query_google_analytics.inc +++ b/google_analytics_views/plugins/google_analytics_plugin_query_google_analytics.inc @@ -253,7 +253,7 @@ class google_analytics_plugin_query_google_analytics extends views_plugin_query $views_result[] = (object) $row; } - $view->result = $views_result; + $view->result = isset($views_result) ? $views_result : array(); $view->execute_time = microtime(TRUE) - $start; if ($this->pager->use_pager()) { $view->total_rows = $this->pager->get_total_items();