From 8b516b88d6a310cdb278342eaa53c445d907ce20 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Fri, 1 Sep 2023 11:23:33 +0200 Subject: [PATCH] ExpirationWidget: Cast progress ratio to string float correctly --- library/X509/ExpirationWidget.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/X509/ExpirationWidget.php b/library/X509/ExpirationWidget.php index 989dfbcd..36d7d9aa 100644 --- a/library/X509/ExpirationWidget.php +++ b/library/X509/ExpirationWidget.php @@ -74,7 +74,7 @@ protected function assemble() $progressBarStyle = (new Style()) ->setModule('x509') ->setNonce(Csp::getStyleNonce()) - ->addFor($progressBar, ['width' => $ratio]); + ->addFor($progressBar, ['width' => sprintf('%F%%', $ratio)]); $this->addHtml(Html::tag('span', ['class' => 'progress-bar-label', 'title' => $dateTip], $message)); $this->addHtml($progressBarStyle, Html::tag('div', ['class' => 'progress-bar dont-print'], $progressBar));