html_tag_short fix

This commit is contained in:
Roman 2025-08-27 09:49:04 +02:00
parent f7d11c297d
commit 4bcfc3ad9f

@ -229,7 +229,7 @@ function html_tag_ex(string $tag, array $attributes, $content = "", bool $escape
$content = htmlspecialchars($content);
}
return ($short && !empty($content)) ? "<$tag$attrs/>" : "<$tag$attrs>$content</$tag>";
return ($short && empty($content)) ? "<$tag$attrs/>" : "<$tag$attrs>$content</$tag>";
}
function getClassPath($class, string $suffix = ".class"): string {
@ -345,4 +345,4 @@ function loadEnv(?string $file = NULL, bool $putEnv = false): array|null {
}
return $env;
}
}