PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB_DataObject » Bug #1980

Logic error in joinAdd method

Details

Submitted2004-07-26 14:01 UTC
FromP dot Kirov at bg dot forsythpartners dot com
Assignedalan_k
StatusClosed
PackageDB_DataObject
PHP Version4.3.2
OSLinux 2.6.5
Roadmaps(Not assigned)

Comments

[2004-07-26 14:01 UTC] P dot Kirov at bg dot forsythpartners dot com

Description:
------------
if ($quoteIdentifiers) {
$joinAs = $DB->quoteIdentifier($joinAs);
$table = $DB->quoteIdentifier($table);
$ofield = $DB->quoteIdentifier($ofield);
$tfield = $DB->quoteIdentifier($tfield);
}

$fullJoinAs = '';
if ( $DB->quoteIdentifier($obj->__table) != $joinAs) {
$fullJoinAs = "AS {$joinAs}";
}

Reproduce code:
---------------
if ($quoteIdentifiers) {
$joinAs = $DB->quoteIdentifier($joinAs);
$table = $DB->quoteIdentifier($table);
$ofield = $DB->quoteIdentifier($ofield);
$tfield = $DB->quoteIdentifier($tfield);
}

$fullJoinAs = '';
if ($obj->__table != $joinAs) {
$fullJoinAs = "AS {$joinAs}";
}