Review main Merged

46925[BUGFIX] Check whether contentElementCache for language and colPos is valid

Andreas Kienast CR +2 V +2 Easy +6 −4 updated 03/04/16, 10:40

Commit message

It may happen that ``$this->contentElementCache[$lP][$colPos]`` is either not
an array nor null. Wrap the foreach loop with an if condition to catch possible
errors.

Review

  • Code review CR +2
    • Christian Kuhn +2
    • Mathias Schreiber +1
    • Claus Due +1
    • Wouter Wolters +1
    • Dmitry Dulepov +1
  • Verified V +2
    • Christian Kuhn +2
    • Mathias Schreiber +1
    • Dmitry Dulepov +1

Issues 1

Files 1

Review log 8

  1. Andreas Kienast uploaded patch set 1 02/26/16, 20:18

  2. Wouter Wolters voted on patch set 1 CR +1 02/26/16, 20:20

  3. Claus Due commented on patch set 1 CR +1 02/29/16, 11:35

    Confirmed, this would solve the problem. But out of interest because this seems to arise in only some edge cases when using a custom instance of the PageLayoutView... does anyone know what the proper way to fill this cache array would be?
  4. Dmitry Dulepov voted on patch set 1 CR +1 V +1 03/03/16, 10:56

  5. Mathias Schreiber commented on patch set 1 CR +1 V +1 03/04/16, 09:53

    I will upvote this change although I don't think it is the task of the core to catch every user error from the outside. The core would get swamped with unneccesary if statements just because people don't do their homework. The CE cache is an array composed out of the languageUid on level 1 , colPos on level 2 and the uid of tt_content on level 3. So $this->contentElementCache[2][0][45] = rowFromTtContent; 2 = sys_language_uid 0 = colPos 45 = uid of tt_content row.
  6. Christian Kuhn voted on patch set 1 CR +2 V +2 03/04/16, 10:40

  7. Gerrit merged patch set 1 03/04/16, 10:40

  8. Christian Kuhn commented on patch set 2 03/04/16, 10:40

    Cherry Picked This patchset was cherry picked to branch TYPO3_7-6 as commit 0a7d3fe2576a99155f6911ded56be801dec590f9