diff --git a/components/ILIAS/UI/src/Implementation/Component/Chart/Bar/Renderer.php b/components/ILIAS/UI/src/Implementation/Component/Chart/Bar/Renderer.php index f80980c61f60..87657fd49384 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Chart/Bar/Renderer.php +++ b/components/ILIAS/UI/src/Implementation/Component/Chart/Bar/Renderer.php @@ -136,7 +136,7 @@ protected function determineHeightForHorizontal(Bar\Bar $component): string $height = $max_height; } - return $height . "px"; + return (string) (int) $height; } protected function determineHeightForVertical(Bar\Bar $component): string @@ -149,7 +149,7 @@ protected function determineHeightForVertical(Bar\Bar $component): string $height = $max_height; } - return $height . "px"; + return (string) (int) $height; } protected function getAccessibilityList( diff --git a/components/ILIAS/UI/tests/Component/Chart/Bar/ChartBarTest.php b/components/ILIAS/UI/tests/Component/Chart/Bar/ChartBarTest.php index 8b805ced8b13..3b8c478dabac 100755 --- a/components/ILIAS/UI/tests/Component/Chart/Bar/ChartBarTest.php +++ b/components/ILIAS/UI/tests/Component/Chart/Bar/ChartBarTest.php @@ -345,7 +345,7 @@ public function testRenderHorizontal(): void $expected_html = << - +
@@ -378,7 +378,7 @@ public function testRenderVertical(): void $expected_html = << - +