Home » Database » DB_ldap » Bug #5542
mis-quoted when bind a string variable
Details
| Submitted | 2005-09-28 03:16 UTC |
|---|---|
| From | shimooka at doyouphp dot jp |
| Status | Bogus |
| Package | DB_ldap |
| PHP Version | 4.3.2 |
| OS | RHL 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''