Issue Bug Closed

#16543page module: MM table needs TCA for neg_foreign_table when value is zero

Franz Holzinger 09/08/06, 21:24 updated 09/05/13, 09:08

Description

In the page module on the right side I get an SQL error message:

SELECT *
FROM
WHERE
uid=0

The reason for this is the line 1906 in class.t3lib_befunc.php
$rVal = intval($rVal);
if ($rVal>0) {
$r=t3lib_BEfunc::getRecordWSOL($theColConf[‘foreign_table’],$rVal);
} else {
$r=t3lib_BEfunc::getRecordWSOL($theColConf[‘neg_foreign_table’],-$rVal);
}

The value is 0 here, but no neg_foreign_table has been defined. I think the if should be
if ($rVal>=0)
.
$rVal comes from the value of the field and in this case it is always a positive number, but 0 by default when nothing has been assigned to it.

function getProcessedValue:
$value: string $value is the value of that field from a selected record

(issue imported from #M4184)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.