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_ldap » Bug #5542

mis-quoted when bind a string variable

Details

Submitted2005-09-28 03:16 UTC
Fromshimooka at doyouphp dot jp
StatusBogus
PackageDB_ldap
PHP Version4.3.2
OSRHL ES3.0
Roadmaps(Not assigned)

Comments

[2005-09-28 03:16 UTC] shimooka at doyouphp dot jp

Description:
------------
mis-quoted when prepared and bound a string variable.

Test script:
---------------
<?php
require_once('DB.php');
?>
<?php
$db = DB::connect('ldap://cn=admin,o=test:password@localhost');
if (DB::isError($db)) {
die(DB::errorMessage($db));
}
$db->ldapSetBase('ou=xxxx,ou=xxxx,ou=xxxx,o=test');
$stmt =& $db->prepare('objectClass=?');
$rs =& $db->execute($stmt, array('inetOrgPerson'));
var_dump($rs->numRows());
while ($row =& $rs->fetchRow()) {
var_dump($row);
}
$rs->free();
$db->disconnect();
?>

Expected result:
----------------
in DB_ldap::execute, $realquery will be 'objectClass=inetOrgPerson'

Actual result:
--------------
in DB_ldap::execute, $realquery is ''objectClass=inetOrgPerson''