Actions
Bug #17528
closedBEenableFields returns only ' AND ' in some cases
Start date:
2007-08-13
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
4.2
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
If you call BEenableFields and nothing fits for the IF condition inside, then ' AND ' is returned. This is very bad, because it leads to a SQL error if this strange return value is not caught and not used to build a SQL query.
So this behaviour complicates the thing very much.
Solution:
$outQ = ($inv ? ($invQuery != '' ? '('.implode(' OR ',$invQuery).')' : '') : ($query != '' ? implode(' AND ',$query) : ''));
$outQ = ($outQ != '' ? ' AND '.$outQ : '');
(issue imported from #M6141)
Actions