diff --git a/charts.module b/charts.module index 5cf5cb04b6607ba0e0ff998e7a32d33427580a4e..a635c3f5315bb82273f80bf8358cf0ee28835374 100644 --- a/charts.module +++ b/charts.module @@ -73,10 +73,11 @@ function charts_chart(&$data) { // Include the file that has the rendering function include_once $chart_provider[$data['#plugin']]['file']; - $func = $chart_provider[$data['#plugin']]['render']; - - // Using the filter's rendering function, print the chart - return $func($data); + if ($func = $chart_provider[$data['#plugin']]['render']) { + // Using the filter's rendering function, print the chart + return $func($data); + } + return ''; } /**