Skip to content

Commit

Permalink
[BUGFIX] Cast potentially null subject in v:format.replace
Browse files Browse the repository at this point in the history
  • Loading branch information
NamelessCoder committed Sep 6, 2023
1 parent b0934e3 commit 0328e43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/ViewHelpers/Format/ReplaceViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static function renderStatic(
\Closure $renderChildrenClosure,
RenderingContextInterface $renderingContext
) {
$content = $renderChildrenClosure();
$content = (string) $renderChildrenClosure();
/** @var string $substring */
$substring = (string) $arguments['substring'];

Check failure on line 46 in Classes/ViewHelpers/Format/ReplaceViewHelper.php

View workflow job for this annotation

GitHub Actions / PHPStan, PHP 7.4 TYPO3 ^10.4

Cannot cast mixed to string.

Check failure on line 46 in Classes/ViewHelpers/Format/ReplaceViewHelper.php

View workflow job for this annotation

GitHub Actions / PHPStan, PHP 8.0 TYPO3 ^11.5

Cannot cast mixed to string.

Check failure on line 46 in Classes/ViewHelpers/Format/ReplaceViewHelper.php

View workflow job for this annotation

GitHub Actions / PHPStan, PHP 8.1 TYPO3 ^11.5

Cannot cast mixed to string.

Check failure on line 46 in Classes/ViewHelpers/Format/ReplaceViewHelper.php

View workflow job for this annotation

GitHub Actions / PHPStan, PHP 8.1 TYPO3 ^12.1

Cannot cast mixed to string.

Check failure on line 46 in Classes/ViewHelpers/Format/ReplaceViewHelper.php

View workflow job for this annotation

GitHub Actions / PHPStan, PHP 8.2 TYPO3 ^12.1

Cannot cast mixed to string.
/** @var string $replacement */
Expand Down

0 comments on commit 0328e43

Please sign in to comment.