Project

General

Profile

Actions

Bug #17360

closed

Tools -> DB Check -> Manage Reference Index crashes with Fatal error: Cannot use string offset as an array

Added by Thomas Kowtsch over 17 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2007-06-06
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I tried to migrate a v3.8 installation to 4.1.1; including the update to the most recent XAMPP package.
With every try to access Tools -> DB Check -> Manage Reference Index -> Update I just got the error
"Fatal error: Cannot use string offset as an array in D:\xampp\htdocs\intranet\typo3conf\ext\kb_conttable\class.tx_t3lib_befunc.php on line 87" [line number might be different due to conversion to DOS file format]

Affected is function "getFlexFormDS_postProcessDS"; starting after line
$newDSArray = $dsArray;

By adding some debugging lines I noticed that sometimes the parameter $dsArray isn't an array at all; printing the variable by var_dump() comes up with [[string(28) "Line 1: Invalid document end"]]

In order to make the function work at all, I put in the following code right before the array assignment:

if (!is_array($dsArray)){
return false;
}

Handling the error properly is the minimum requirement at this point; avoiding this scenario would be even better.
If anyone can tell me how to find out who or what is calling the function (in this error case) I can help to get the root cause fixed.

(issue imported from #M5746)

Actions

Also available in: Atom PDF