diff --git a/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php b/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
index 0e3dd3a1c5ab632324368b33f5e0f12dad6258ee..476ac5436b7833ca1dbf952ebb77a5a4fc120d58 100644
--- a/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
+++ b/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
@@ -3590,7 +3590,7 @@ class ContentObjectRenderer implements LoggerAwareInterface
                 $replaceArray = $typoScriptService->explodeConfigurationForOptionSplit([$replace], $splitCount);
                 $replaceCount = 0;
 
-                $replaceCallback = function () use ($replaceArray, $search, &$replaceCount) {
+                $replaceCallback = function () use ($replaceArray, &$replaceCount) {
                     $replaceCount++;
                     return $replaceArray[$replaceCount - 1][0];
                 };