We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10bd5d9 commit 5466c2dCopy full SHA for 5466c2d
src/TgUtils/Html.php
@@ -16,13 +16,14 @@ class Html {
16
*/
17
public static function renderStartTag($tagName, $attributes = array(), $closeTag = FALSE) {
18
$rc = '<'.$tagName;
19
- foreach ($attributes AS $name => $value) {
20
- if (is_array($value)) $value = implode(' ', $value);
21
- if (is_string($value) && trim($value) != '') {
22
- $rc .= ' '.$name.'="'.htmlspecialchars($value).'"';
+ if (is_array($attributes)) {
+ foreach ($attributes AS $name => $value) {
+ if (is_array($value)) $value = implode(' ', $value);
+ if (is_string($value) && trim($value) != '') {
23
+ $rc .= ' '.$name.'="'.htmlspecialchars($value).'"';
24
+ }
25
}
26
-
27
if ($closeTag) $rc .= '/';
28
$rc .= '>';
29
return $rc;
0 commit comments