From 9c1d9cf06c19f45321f927dafb2c7252d42b1bb2 Mon Sep 17 00:00:00 2001 From: MartkCz Date: Fri, 5 Jun 2020 15:18:37 +0200 Subject: [PATCH] strict types (#248) --- src/Forms/Validator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Forms/Validator.php b/src/Forms/Validator.php index fbf2700de..e970ffd6f 100644 --- a/src/Forms/Validator.php +++ b/src/Forms/Validator.php @@ -78,7 +78,7 @@ public static function formatMessage(Rule $rule, bool $withValue = true) $caption = $caption instanceof Nette\Utils\IHtmlString ? $caption->getText() : ($translator ? $translator->translate($caption) : $caption); - return rtrim($caption, ':'); + return rtrim((string) $caption, ':'); } return ''; case 'value': return $withValue ? $rule->control->getValue() : $m[0];