Actions
Bug #16799
closedxml2array crashes sometimes since php 5.2
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
Actions