From 5353cc9c6942d9b979a5cadd90e70bf5f87db657 Mon Sep 17 00:00:00 2001 From: Fabian Helfer Date: Fri, 30 Jan 2026 15:01:13 +0100 Subject: [PATCH] [Fix] 0047062 UI: Canvas height attribute must be numeric (no "px") --- .../UI/src/Implementation/Component/Chart/Bar/Renderer.php | 4 ++-- .../ILIAS/UI/tests/Component/Chart/Bar/ChartBarTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 = << - +