Project

General

Profile

Actions

Bug #44270

closed

wrong result in substituteMarkerArrayCached

Added by Franz Holzinger over 11 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2013-01-02
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

After some usage of the function it ends up in an error message.

Core: Error handler (FE): PHP Warning: Invalid argument supplied for foreach() in /var/www/mydomain/typo3_src-4.7.7/typo3/sysext/cms/tslib/class.tslib_content.php line 1727

Which is the line:
foreach ($storeArr['k'] as $n => $keyN) {

The debug information is:

class.tslib_content.php 1678:
$storeArrDat = $GLOBALS['TSFE']->sys_page->getHash($storeKey);

a:2:{s:1:"c";b:0;s:1:"k";N;}
$storeArrDat after sys_page->getHash (string)

So the $storeArr is an array of k and c with empty values. This causes the next foreach to crash.

In such a case the "if (!isset($storeArrDat)) {" branch should have been reached.

However this still won't work because after some modification it ends up in:

Core: Error handler (FE): PHP Warning: preg_split(): Compilation failed: regular expression is too large at offset 32848 in /var/www/mydomain/typo3_src-4.7.7/typo3/sysext/cms/tslib/class.tslib_content.php line 1708

So for this issue: It should not throw the foreach error but another details error message in order to know about the wrong preg_split function.


Files

patch-44270.diff (1.07 KB) patch-44270.diff Franz Holzinger, 2015-09-01 16:12

Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #72224: problems introduced by bugfix 44270ClosedMarkus Klein2015-12-14

Actions
Related to TYPO3 Core - Bug #72252: substituteMarkerArrayCached not substitute $subpartContentArrayClosedMarkus Klein2015-12-15

Actions
Related to TYPO3 Core - Bug #73598: Three hash (###) marker in JavaScript creates the problem in TYPO3 6.2.18Closed2016-02-22

Actions
Actions

Also available in: Atom PDF