diff options
author | Andrew Dolgov <[email protected]> | 2021-03-08 17:39:24 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-03-08 17:39:24 +0300 |
commit | cfb48825911b8d3d1e7a3e1492f25319cc01a7f9 (patch) | |
tree | fdbfc7e81e354a1dc611f2f8df4a0ca5e34aa21b /include/controls.php | |
parent | 28dd255c30c7bdb528ec1fde2391705fbc9b4cf6 (diff) |
cleanup javascript_tag and stylesheet_tag
Diffstat (limited to 'include/controls.php')
-rwxr-xr-x | include/controls.php | 6 |
1 files changed, 3 insertions, 3 deletions
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) |