Project

General

Profile

Actions

Bug #17528

closed

BEenableFields returns only ' AND ' in some cases

Added by Franz Holzinger over 17 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
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)


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #19440: t3lib_BEfunc::BEenableFields generates invalid SQLClosedDmitry Dulepov2008-10-09

Actions
Actions #1

Updated by Kasper Ligaard about 16 years ago

I think this could be closed because of this: http://bugs.typo3.org/view.php?id=9522

Actions

Also available in: Atom PDF