Skip to content

Commit

Permalink
Refs matomo-org#4041, fix regression in tag cloud.
Browse files Browse the repository at this point in the history
  • Loading branch information
Benaka Moorthi committed Sep 19, 2013
1 parent 7e9c1c6 commit ce27579
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/CoreVisualizations/Visualizations/Cloud.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ public function __construct($view)

$self = $this;
$view->after_data_loaded_functions[] = function ($dataTable, $view) use ($self) {
$columnToDisplay = $view->columns_to_display[1];
if ($dataTable->getRowsCount() == 0) {
return;
}

$columnToDisplay = isset($view->columns_to_display[1]) ? $view->columns_to_display[1] : 'nb_visits';

$labelMetadata = array();
foreach ($dataTable->getRows() as $row) {
Expand Down

0 comments on commit ce27579

Please sign in to comment.