This commit is contained in:
Maxime Rainville 2024-05-05 05:30:33 +12:00 committed by GitHub
commit 1505de5875
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -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(