summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Wehner2012-01-29 10:00:09 (GMT)
committer Daniel Wehner2012-01-29 10:00:09 (GMT)
commit2474db15261bed98f8c16b8557c019b58a8f32c9 (patch)
tree1cfba43c2e3abf8302b3dc1a3686cd5f51c2cc20
parent8ddf2f7c6509678ca4d6e8f82e5550ea62f42677 (diff)
#1407866 by dereine: Fix some notice when validate style plugins without grouping field
-rw-r--r--plugins/views_plugin_style.inc11
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/views_plugin_style.inc b/plugins/views_plugin_style.inc
index 0773476..627b9f2 100644
--- a/plugins/views_plugin_style.inc
+++ b/plugins/views_plugin_style.inc
@@ -218,10 +218,13 @@ class views_plugin_style extends views_plugin {
}
function options_validate(&$form, &$form_state) {
- // Don't save grouping if no field is specified.
- foreach ($form_state['values']['style_options']['grouping'] as $index => $grouping) {
- if (empty($grouping['field'])) {
- unset($form_state['values']['style_options']['grouping'][$index]);
+ // Don't run validation on style plugins without the grouping setting.
+ if (isset($form_state['values']['style_options']['grouping'])) {
+ // Don't save grouping if no field is specified.
+ foreach ($form_state['values']['style_options']['grouping'] as $index => $grouping) {
+ if (empty($grouping['field'])) {
+ unset($form_state['values']['style_options']['grouping'][$index]);
+ }
}
}
}