Project

General

Profile

Actions

Bug #17477

closed

Undefined variable is used in t3lib_BEfunc::exec_foreign_table_where_query

Added by Oliver Klee over 17 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2007-07-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
5.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

function exec_foreign_table_where_query($fieldValue,$field='',$TSconfig=array(),$prefix='') {
global $TCA;

t3lib_div::loadTCA($foreign_table);
$foreign_table = $fieldValue['config'][$prefix.'foreign_table'];

Here, $foreign_table is used although it is undefined, causing the loadTCA to fail.

(issue imported from #M5983)


Files

0005983.patch (651 Bytes) 0005983.patch Administrator Admin, 2007-07-17 20:13
5983_v2.diff (666 Bytes) 5983_v2.diff Administrator Admin, 2010-09-18 15:14

Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #21891: t3lib_BEfunc::exec_foreign_table_where_query has wrong definitionClosedChris topher2009-12-29

Actions
Actions #1

Updated by Oliver Hader over 17 years ago

the $prefix variable could be empty or 'neg_'.
The method you mentioned is called from t3lib_transferdata::selectAddForeign(), but I bet you knew that already. ;-)

The loadTCA line was introduced in a patch for Workspaces&IRRE:
http://svn.t3.digitaldistrict.de/cgi-bin/trac.cgi/changeset/12461

Actions #2

Updated by Christian Kuhn about 16 years ago

What is the effect of this undefined call?

Digging into the function I think that $rootLevel is always null because of this and the check for "if ($rootLevel) { ... } else { .. } will always jump into the else part.

So a problem might occur for mm relations on the root page?

Actions #3

Updated by Benni Mack almost 15 years ago

This is a clear bug, would you care to send it to the core list?

Actions #4

Updated by Steffen Gebert about 14 years ago

committed to
- trunk rev. 8809
- 4-4 rev. 8808

Actions #5

Updated by Steffen Gebert about 14 years ago

Now also committed to
- 4-3 rev. 8877
- 4-2 rev. 8876

Actions #6

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF