From a7b9f3c36c617a92bfdc5b824f08d17e459ddf43 Mon Sep 17 00:00:00 2001 From: Julien Turbide Date: Tue, 4 Jul 2023 18:35:14 -0400 Subject: [PATCH] fix tag refactoring --- src/Tag.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Tag.php b/src/Tag.php index 2b34fba1..641d4530 100644 --- a/src/Tag.php +++ b/src/Tag.php @@ -244,10 +244,11 @@ public static function tagParams(string $tag, array $params = [], string $format */ public static function getParams(array $params = [], string $format = ' %2$s="%1$s"', ?string $glue = null): string { + $retParams = []; foreach ($params as $param) { - $params = array_merge_recursive(self::getAttr($param), $params); + $retParams = array_merge_recursive(self::getAttr($param), $retParams); } - return self::implodeSprintf($params, $format, $glue); + return self::implodeSprintf($retParams, $format, $glue); } public static function params(array $params = [], string $format = ' %2$s="%1$s"', ?string $glue = null): void