Issue Bug Rejected

#104590`substituteMarkerArray` should ignore `(array)`

Marcus Förster 08/11/24, 18:58 updated 07/13/25, 20:06

Description

--- vendor/typo3/cms-core/Classes/Service/MarkerBasedTemplateService.bak    2024-08-11 20:52:35.812856063 +0200
+++ vendor/typo3/cms-core/Classes/Service/MarkerBasedTemplateService.php    2024-08-11 20:52:35.812856063 +0200
@@ -208,6 +208,9 @@
             $search = [];
             $replace = [];
             foreach ($markContentArray as $marker => $markContent) {
+                if (is_array($markContent)) {
+                    continue;
+                }

expl.

  sourceCollection {
    UHD8 {
      dataKey = UHD8
      width   = 7680
      mediaQuery = (max-width: 7680px),(max-width: 3840px) and (min-resolution: 2dppx)
      if.isLessThan.data = field:width // file:current:width
      if.value < .width
      if.negate = 1
    }

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 9

  1. Garvin Hicking commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2025-05-23T11:57:34+00:00" > 05/23/25, 11:57 </span>

    Could you please provide details, thanks!

  2. Marcus Förster commented <span data-processor="relativetime" data-value="2025-05-23T12:05:41+00:00" > 05/23/25, 12:05 </span>

    Garvin Hicking wrote in #note-5:
    > Could you please provide details, thanks!

    not shure what else to provide ; you can see that “if” is an array which throws a warning @ https://github.com/TYPO3/typo3/blob/2f3bdf6e4f974ef882d27adddd74e574ca5bad4a/typo3/sysext/core/Classes/Service/MarkerBasedTemplateService.php#L226

  3. Garvin Hicking commented <span data-processor="relativetime" data-value="2025-05-23T12:14:37+00:00" > 05/23/25, 12:14 </span>

    I would just like to know what I can easily do to get the error behaviour, to be sure that this patch fixes the issue.

    The patch currently just ignores arrays, but I wonder how an array gets into there, and what it holds – because no substitution would then be performed. So to me this feels as if there is a different underlying problem and we would need to address why a multidimension array gets in here.

  4. Marcus Förster commented <span data-processor="relativetime" data-value="2025-05-23T12:27:03+00:00" > 05/23/25, 12:27 </span>

    str_replace does not accept array => may filter it before :)

  5. Garvin Hicking commented and changed status Needs Feedback Rejected <span data-processor="relativetime" data-value="2025-07-13T20:06:55+00:00" > 07/13/25, 20:06 </span>

    Lacking details to understand/reproduce, I’m sorry but we need to close unclear issues.