From ecf814272cc7d0b72f4cbdbc701561838a6bf939 Mon Sep 17 00:00:00 2001 From: Nathan Haug <nate@lullabot.com> Date: Mon, 17 Mar 2014 19:22:08 -0700 Subject: [PATCH] Issue #2203421 by stella: Ignore chart add-ons that don't produce results. --- views/charts_plugin_style_chart.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/views/charts_plugin_style_chart.inc b/views/charts_plugin_style_chart.inc index 7efb891..2eb0d79 100644 --- a/views/charts_plugin_style_chart.inc +++ b/views/charts_plugin_style_chart.inc @@ -265,6 +265,12 @@ class charts_plugin_style_chart extends views_plugin_style { // Execute the subview and get the result. $subview->pre_execute(); $subview->execute(); + + // If there's no results, don't attach the subview. + if (empty($subview->result)) { + continue; + } + $subchart = $subview->style_plugin->render($subview->result); $subview->post_execute(); unset($subview); -- GitLab