Bug #15203
closedCopy sites with flexible content elements inside crash with fatal error
0%
Description
Line 3319 of /t3lib/class.t3lib_div.php (Rev. 1.84) unsets an array-offset that not necessarily exists, this forces an fatal error that should be prevented with an isset-Condition.
(issue imported from #M1869)
Files
Updated by Sebastian Kurfuerst almost 19 years ago
Hi,
you use PHP5, right?
Greets, Sebastian
Updated by René Wagner almost 19 years ago
Hi Sebastian,
yes its right. PHP 5.0.4. But i didn't find any diffenenz between the versions by unsetting nonexistent variables. Even if, testing before is not as bad. :)
Thanks.
René
Updated by Sebastian Kurfuerst almost 19 years ago
Hi,
can you please check if the attached patch fixes your issue? I still use PHP 4 so I cannot test right now.
Greets, Sebastian
Updated by René Wagner almost 19 years ago
Hi Sebastian,
works fine. I solved it exactly the same.
Thanks for patching.
Updated by René Wagner almost 19 years ago
I found a bug in PHP that our solution infiltrates. If $dataStruct is a string and not an array, isset() on a nonexistent key returns always true. This is also reported in manual http://de3.php.net/manual/de/function.isset.php. So a check for type array is needed first.
if (is_array($dataStruct) && isset($dataStruct['meta'])) unset($dataStruct['meta']);
should fix this bug. If $dataStruct isn't an array, the isset-Check can be void, so i have choose &&.
Updated by Sebastian Kurfuerst almost 19 years ago
Hi Robert,
I hope you are alright! If you could have a look at this issue (the last note), this would be of great help.
Thanks,
and greets from Dresden,
Sebastian
Updated by Oliver Hader over 16 years ago
This issue was fixed in TYPO3 4.0.0.
Closed during Bug Day 07/2008