diff --git a/framework/yii/widgets/DetailView.php b/framework/yii/widgets/DetailView.php index 43d5a3e..a97bc20 100644 --- a/framework/yii/widgets/DetailView.php +++ b/framework/yii/widgets/DetailView.php @@ -186,6 +186,10 @@ class DetailView extends Widget throw new InvalidConfigException('The attribute configuration must be an array.'); } + if (isset($attribute['visible']) && !$attribute['visible']) { + continue; + } + if (!isset($attribute['format'])) { $attribute['format'] = 'text'; }