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 #2187

index parent not found

Details

Submitted2004-08-21 22:14 UTC
Fromfernkorn at epost dot de
StatusWont fix
PackageDB_NestedSet
PHP Version4.3.8
OSlinux
Roadmaps(Not assigned)

Comments

[2004-08-21 22:14 UTC] fernkorn at epost dot de

Description:
------------
hi,
i have made a getSubbranch call and get back an nested set error:
In /PEAR/DB/NestedSet.php, line: 1855
Undefined index: parent

the result of the call is ok, but i dont like this nasty error message..is it a bug?

best regards
karsten fernkorn

Reproduce code:
---------------
$sub_branch=$NeSe->getSubbranch($search_geo_node, TRUE);

[2004-09-01 15:54 UTC] dk at webcluster dot at

Sorry for the delay.
Do you have a column called 'parent'.
The current data model needs ist for some calls.

Especially the newer additions may rely on it. And as it also speeds up things it's really a good idea to use it.

[2004-09-02 10:42 UTC] psion_mf at gmx dot de

If some functions rely on the column 'parent' I think it should be added to $_requiredParams. Otherwise there are errors like the one here.

[2004-09-02 11:42 UTC] dk at webcluster dot at

Don't agree.
The one triggers a warning the other an error.
Plus - to get a valid preorder sorted subbranch (which leads into the method causing the error) is only possible since 1 or 2 releases.
The new model with the parent field exists much longer.
It would be a waste of time to add additional - "if preorder sorted then you need the parent column error checks" as this issue can be solved by simple adding the field in question :)

The DB_NestedSet API is very bloated meanwhile, there are many many conditions which can lead into many different paths of execution and I will try my best to get this under control again.

greetings

--
Daniel Khan