Fix #17793: Fix inconsistent handling of null data attribute values in yii\helpers\BaseHtml::renderTagAttributes()

This commit is contained in:
Brandon Kelly
2020-01-10 10:35:09 -08:00
committed by Alexander Makarov
parent 7e471e3010
commit beca7b45d3
3 changed files with 10 additions and 1 deletions

View File

@ -1961,7 +1961,7 @@ class BaseHtml
if ($v) {
$html .= " $name-$n";
}
} else {
} elseif ($v !== null) {
$html .= " $name-$n=\"" . static::encode($v) . '"';
}
}