diff --git a/src/User/resources/views/rule/index.php b/src/User/resources/views/rule/index.php index 7e5e15d7..b26f0837 100644 --- a/src/User/resources/views/rule/index.php +++ b/src/User/resources/views/rule/index.php @@ -35,9 +35,11 @@ 'attribute' => 'className', 'label' => Yii::t('usuario', 'Class'), 'value' => function ($row) { - $rule = unserialize($row['data']); + if (!isset($row['data']) || ($data = @unserialize(is_resource($row['data']) ? stream_get_contents($row['data']) : $row['data'])) === false) { + $data = null; + } - return get_class($rule); + return get_class($data); }, 'options' => [ 'style' => 'width: 20%'