PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB_NestedSet » Bug #5474

Object used as array

Details

Submitted2005-09-21 13:56 UTC
Frommotz at divis-hagen dot de
Assigneddatenpunk
StatusDuplicate
PackageDB_NestedSet
PHP VersionIrrelevant
OSOS X
Roadmaps(Not assigned)

Comments

[2005-09-21 13:56 UTC] motz at divis-hagen dot de

Description:
------------
I'm using the 1.3.6 version of BD_NestedSet an tried to get a
preorder subBranch. The internal _secSort-method uses the uses
an instance-var (parent) and refers to it as an array index.
This produces an error with PHP 5.
Make the following changes:

Test script:
---------------
NestedSet.php, Line 1855

change
$deepArray[$node['parent']][$nodeID] = $node;

to
$deepArray[$node->parent][$nodeID] = $node;

[2005-10-25 23:43 UTC] datenpunk at php dot net

See bug #4702.
Anyways - it's fixed in CVS now.

Thanks for your report

--
Daniel Khan