Skip to content

Commit 4b779e0

Browse files
authored
[BUGFIX] Cast to string before trim (#1934)
Fixes PHP Runtime Deprecation Notice: trim(): Passing null to parameter #1 ($string) of type string is deprecated in Classes/ViewHelpers/Format/TrimViewHelper.php line 45
1 parent d2ced75 commit 4b779e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Classes/ViewHelpers/Format/TrimViewHelper.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ public static function renderStatic(
4040
$characters = $arguments['characters'];
4141
$content = $renderChildrenClosure();
4242
if (!empty($characters)) {
43-
$content = trim($content, $characters);
43+
$content = trim((string) $content, $characters);
4444
} else {
45-
$content = trim($content);
45+
$content = trim((string) $content);
4646
}
4747
return $content;
4848
}

0 commit comments

Comments
 (0)