Skip to content

Commit 2feb5d9

Browse files
committed
Merge branch 'develop'
2 parents b4436b7 + 5e901b1 commit 2feb5d9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

DashboardPanel.class.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,17 +401,21 @@ protected function renderAttributes($attributes = [])
401401
if (!is_array($attributes)) {
402402
return $attributes;
403403
}
404+
404405
if (empty($attributes)) {
405406
return '';
406407
}
407408

408409
$attributePairs = [];
409410
foreach ($attributes as $key => $val) {
411+
if ($val === false || $val === null) {
412+
continue;
413+
}
410414
if (is_int($key)) {
411415
$attributePairs[] = $val;
412416
continue;
413417
}
414-
$val = htmlspecialchars($val, ENT_QUOTES);
418+
$val = htmlspecialchars((string) $val, ENT_QUOTES);
415419
$attributePairs[] = "{$key}=\"{$val}\"";
416420
}
417421

0 commit comments

Comments
 (0)