Commit 1d97c107aa4d8adb28c7458b4123365a81ffb4d9
1 parent
58cb1826
ga output
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
app/library/App/Controllers/GaController.php
... | ... | @@ -41,7 +41,9 @@ class GaController extends CrudResourceController { |
41 | 41 | $projects = Project::find(['user_id' => $user_id]); |
42 | 42 | foreach ($projects as $project) { |
43 | 43 | $view_id = (string)$project->ga_view_id; |
44 | - $result[] = $this->sendGaRequest($project->name, $view_id, $get_metrics, $get_dimensions, $get_start_date, $get_end_date, $chart); | |
44 | + if (!empty($view_id)) { | |
45 | + $result[] = $this->sendGaRequest($project->name, $view_id, $get_metrics, $get_dimensions, $get_start_date, $get_end_date, $chart); | |
46 | + } | |
45 | 47 | } |
46 | 48 | } |
47 | 49 | else { | ... | ... |