diff --git a/HTML/Common.php b/HTML/Common.php
index 487ca5e22..fc7b9bb17 100644
--- a/HTML/Common.php
+++ b/HTML/Common.php
@@ -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;