[BUGFIX] Recursion error when including TypoScript files
authorTobias Liebig <mail_typo3.org@etobi.de>
Thu, 31 Mar 2011 19:48:21 +0000 (21:48 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 17 Apr 2011 17:53:40 +0000 (19:53 +0200)
When editing TypoScript in the template module and using the "Include
TypoScript file content" option with more than 9 files, then the 10th
and all later files gets screwed up.

Thanks to André Spindler for reporting and providing a patch.
Thanks to Kilian Hann (futureconnection AG Zürich) for sponsoring
100 beers during the bug auction.

Change-Id: I2b1363506e5b01a9fb8fa47b792d3351d302eaa9
Resolves: #25374
Reviewed-on: http://review.typo3.org/1362
Reviewed-by: Michael Stucki
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
Reviewed-by: Sebastian Fischer
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn

index 2981219..921b165 100644 (file)
@@ -725,7 +725,7 @@ class t3lib_TSparser {
                                        $extractedFileNames[] = $realFileName;
                                                // recursive call to detected nested commented include statements
-                                       $fileContentString = self::extractIncludes($fileContentString, ++$cycle_counter, $extractedFileNames);
+                                       $fileContentString = self::extractIncludes($fileContentString, $cycle_counter + 1, $extractedFileNames);
                                        if (!t3lib_div::writeFile($realFileName, $fileContentString)) {
                                                throw new RuntimeException(sprintf('Could not write file "%s"', $realFileName), 1294586444);