Skip to content

Commit

Permalink
fixes core#4047 - htmlspecialchars called on empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaphoneJon committed Dec 22, 2022
1 parent f48cb66 commit ad6f08b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion HTML/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function _getAttrString($attributes)
if (is_array($attributes)) {
$charset = HTML_Common::charset();
foreach ($attributes as $key => $value) {
$strAttr .= ' ' . $key . '="' . htmlspecialchars(($value ?? ''), ENT_COMPAT, $charset) . '"';
$strAttr .= ' ' . $key . '="' . htmlspecialchars(($value ?: ''), ENT_COMPAT, $charset) . '"';
}
}
return $strAttr;
Expand Down

0 comments on commit ad6f08b

Please sign in to comment.