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 » Networking » Net_LDAP » Bug #952

Broken Add method in Entry class

Details

Submitted2004-03-05 21:28 UTC
Fromgarretg at uiuc dot edu
Assignedjw
StatusClosed
PackageNet_LDAP
PHP Version4.3.4
OSWin2000
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