From c6076cb3148be19a82671c8a1260b780d5e56ff8 Mon Sep 17 00:00:00 2001 From: Alexander Kochetov Date: Sun, 26 May 2013 18:30:36 +0400 Subject: [PATCH] More refactoring --- framework/yii/jui/Sortable.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/framework/yii/jui/Sortable.php b/framework/yii/jui/Sortable.php index 67213ca..2ff25f7 100644 --- a/framework/yii/jui/Sortable.php +++ b/framework/yii/jui/Sortable.php @@ -107,10 +107,8 @@ class Sortable extends Widget if (!isset($item['content'])) { throw new InvalidConfigException("The 'content' option is required."); } - if (isset($item['options'])) { - $options = array_merge($options, $item['options']); - $tag = ArrayHelper::remove($options, 'tag', $tag); - } + $options = array_merge($options, ArrayHelper::getValue($item, 'options', array())); + $tag = ArrayHelper::remove($options, 'tag', $tag); $items[] = Html::tag($tag, $item['content'], $options); } else { $items[] = Html::tag($tag, $item, $options);