File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
app/code/Magento/Directory/Model/ResourceModel/Country Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -205,6 +205,7 @@ public function getItemById($countryId)
205
205
206
206
/**
207
207
* Add filter by country code to collection.
208
+ *
208
209
* $countryCode can be either array of country codes or string representing one country code.
209
210
* $iso can be either array containing 'iso2', 'iso3' values or string with containing one of that values directly.
210
211
* The collection will contain countries where at least one of contry $iso fields matches $countryCode.
@@ -297,7 +298,7 @@ public function toOptionArray($emptyLabel = ' ')
297
298
}
298
299
$ options [] = $ option ;
299
300
}
300
- if ($ emptyLabel !== false && count ($ options ) > 0 ) {
301
+ if ($ emptyLabel !== false && count ($ options ) > 1 ) {
301
302
array_unshift ($ options , ['value ' => '' , 'label ' => $ emptyLabel ]);
302
303
}
303
304
You can’t perform that action at this time.
0 commit comments