ENH Update AttributesHTML to output alt attribute even if it's empty
This commit is contained in:
parent
142a318fa8
commit
acb262cc75
|
@ -105,9 +105,9 @@ trait AttributesHTML
|
|||
|
||||
$attributes = (array) $attributes;
|
||||
|
||||
$attributes = array_filter($attributes ?? [], function ($v) {
|
||||
return ($v || $v === 0 || $v === '0');
|
||||
});
|
||||
$attributes = array_filter($attributes ?? [], function ($v, $k) {
|
||||
return ($k == 'alt' || $v || $v === 0 || $v === '0');
|
||||
}, ARRAY_FILTER_USE_BOTH);
|
||||
|
||||
if ($exclude) {
|
||||
$attributes = array_diff_key(
|
||||
|
|
Loading…
Reference in New Issue