Baobab
Baobab copied to clipboard
Error with no detail on DeleteNode
I get an "Unexpected error #" message when I call deleteNode with $close_gaps = true. If I switch off close gaps, I dont get the error. Is there any known issues on this method?
Is there any known issues on this method?
No, can you provide a test case?
Hi there,
Yes thank you – I include a zip file with the baobab tree tables. I know have a problem whenever I access any trees. I traced the error into the code and its at line 1375 inside the getTree() method:
debug($numParents);
if (!$root) $root = $node;
this line---> else $parents[$numParents-1]->$appendChild($node);
I call getTree to just use striungify to see what the issue is with the particular tree. I then get an
Unexpected error #0 C:\wamp\www\mmi-strat-api\vendor\riquito\baobab\src\baobab.php(1375):
I would really appreciate some input – I selected your implemention due to the excellent docs, and overall quality API. Howvere – I just released my implementation to the client and started encountering some errors. I REALY hope I am using the code wrong, because I don’t want to start looking for an alternative.
Not sure what is best way to provide a testcase, but by gut tells me that if I provide the DB, you should be able to add a forrest on your side, and just see if you can call gettree()?
From: Riccardo Attilio Galli [mailto:[email protected]] Sent: Thursday, 11 February 2016 12:36 PM To: riquito/Baobab [email protected] Cc: Heinz Seldte [email protected] Subject: Re: [Baobab] Error with no detail on DeleteNode (#7)
Is there any known issues on this method?
No, can you provide a test case?
— Reply to this email directly or view it on GitHubhttps://github.com/riquito/Baobab/issues/7#issuecomment-182798281.
Not sure what is best way to provide a testcase, but by gut tells me that if I provide the DB, you should be able to add a forrest on your side, and just see if you can call gettree()?
Given the nature of the problem usually the only way is to provide a db dump, so your guess is correct. The smaller the better, so that it's easier to analyse the tree.
Since you responded via e-mail Github happily discarded your attachment, I'll send you an-email so that you can re-send it to me.
I'm not actively working on this project anymore and I find it feature complete (but the API and code quality could be better by today standards), but I will try to fix any bug.