Skip to content

Commit c56b4e3

Browse files
Replace isset with in_array for better performance
Co-authored-by: Ihor Sviziev <ihor-sviziev@users.noreply.github.com>
1 parent 7e7d8e4 commit c56b4e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/Magento/Framework/View/Helper/SecureHtmlRender/HtmlRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function renderTag(TagData $tagData): string
7474
}
7575

7676
$html = '<' .$tagData->getTag() .$attributesHtml;
77-
if (in_array($tagData->getTag(), self::VOID_ELEMENTS)) {
77+
if (isset(self::VOID_ELEMENTS_MAP[$tagData->getTag()])) {
7878
$html .= '/>';
7979
} else {
8080
$html .= '>' .$content .'</' .$tagData->getTag() .'>';

0 commit comments

Comments
 (0)