Project

General

Profile

Actions

Bug #16799

closed

xml2array crashes sometimes since php 5.2

Added by Luc Van Eycken almost 18 years ago. Updated over 17 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2006-12-20
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
5
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

xml2array sometimes uses strcspn with an empty first argument. This may crash apache/php, certainly since php 5.2.
The solution is to test for empty strings first (see included one-liner patch).

One could argue that this is a php 5.2 problem, but I think this is also a typo3 problem since the core is using an undocumented php feature here. In the strcspn documentation it is not mentioned how the function responds to an empty first argument. It may even depend on the underlying C-library. So I am in favor of removing this bad programming style from typo3.
(issue imported from #M4678)


Files

T3_strcspn_bug.diff (822 Bytes) T3_strcspn_bug.diff Administrator Admin, 2006-12-20 14:26
t3lib_div-PHP52.diff (877 Bytes) t3lib_div-PHP52.diff Administrator Admin, 2006-12-22 10:10

Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #16780: White Page when editing Contenttype TableClosedMichael Stucki2006-12-12

Actions
Actions

Also available in: Atom PDF