PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

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}";
}