Home » Networking » Net_LDAP » Bug #952
Broken Add method in Entry class
Details
| Submitted | 2004-03-05 21:28 UTC |
|---|---|
| From | garretg at uiuc dot edu |
| Assigned | jw |
| Status | Closed |
| Package | Net_LDAP |
| PHP Version | 4.3.4 |
| OS | Win2000 |
| Roadmaps | (Not assigned) |
Comments
[2004-03-05 21:28 UTC] garretg at uiuc dot edu
Description:
------------
In Net_Ldap 0.6.4, I believe there's a bug in the add method of the Entry object.
New attributes aren't getting added to the _addAttrs array, so the update method fails to pick up the changes.
-Garret Gengler
University of Illinois
Reproduce code:
---------------
The fix is simple... in entry.php:
$this->_attrs[$k][0] = $v;
$this->_attrs[$k]['count'] = 1;
$this->_attrs[$this->_attrs['count']] = $k;
$this->_attrs['count']++;
Should be:
$this->_attrs[$k][0] = $v;
$this->_attrs[$k]['count'] = 1;
$this->_attrs[$this->_attrs['count']] = $k;
$this->_attrs['count']++;
$this->_addAttrs[$k][0] = $v;
[2004-03-12 20:27 UTC] jw at php dot net
Thank you for your bug report. This issue has already been fixed
in the latest released version of the package, which you can download at
http://pear.php.net/packages.php