Skip to content

Commit 2a46811

Browse files
committed
empty -> is_null
1 parent 05daeb4 commit 2a46811

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Select2Widget.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class Select2Widget extends \yii\widgets\InputWidget
4545
* @see \yii\helpers\BaseArrayHelper::map()
4646
* @var array
4747
*/
48-
public $items = [];
48+
public $items;
4949
/**
5050
* A placeholder value can be defined and will be displayed until a selection is made
5151
* @var string
@@ -74,7 +74,7 @@ public function init()
7474
{
7575
parent::init();
7676

77-
if (empty($this->items) && empty($this->data) && empty($this->ajax) && empty($this->settings['data'])) {
77+
if (is_null($this->items) && is_null($this->data) && empty($this->ajax) && empty($this->settings['data'])) {
7878
throw new InvalidConfigException('You need to configute one of the data sources');
7979
}
8080
if (isset($this->tags)) {

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
],
1818
"extra": {
1919
"branch-alias": {
20-
"dev-master": "1.3.1.x-dev"
20+
"dev-master": "1.3.2.x-dev"
2121
}
2222
},
2323
"require": {

0 commit comments

Comments
 (0)