diff --git a/plugins/CoreVisualizations/Visualizations/Cloud.php b/plugins/CoreVisualizations/Visualizations/Cloud.php index 8542416f332..4adffc7e884 100644 --- a/plugins/CoreVisualizations/Visualizations/Cloud.php +++ b/plugins/CoreVisualizations/Visualizations/Cloud.php @@ -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) {