diff --git a/framework/helpers/BaseHtml.php b/framework/helpers/BaseHtml.php
index 0df9fbf7ea..4de696d210 100644
--- a/framework/helpers/BaseHtml.php
+++ b/framework/helpers/BaseHtml.php
@@ -718,7 +718,7 @@ class BaseHtml
*/
public static function listBox($name, $selection = null, $items = [], $options = [])
{
- if (!isset($options['size'])) {
+ if (!array_key_exists($options, 'size')) {
$options['size'] = 4;
}
if (!empty($options['multiple']) && substr($name, -2) !== '[]') {