From cfb48825911b8d3d1e7a3e1492f25319cc01a7f9 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 8 Mar 2021 17:39:24 +0300 Subject: cleanup javascript_tag and stylesheet_tag --- include/controls.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/controls.php') diff --git a/include/controls.php b/include/controls.php index b65a166c2..a1a1bc59b 100755 --- a/include/controls.php +++ b/include/controls.php @@ -2,7 +2,7 @@ namespace Controls; function attributes_to_string(array $attributes) { - $rv = ""; + $rv = []; foreach ($attributes as $k => $v) { @@ -10,10 +10,10 @@ if ($k === "disabled" && !sql_bool_to_bool($v)) continue; - $rv .= "$k=\"" . htmlspecialchars($v) . "\""; + array_push($rv, "$k=\"" . htmlspecialchars($v) . "\""); } - return $rv; + return implode(" ", $rv); } // shortcut syntax (disabled) -- cgit v1.2.3