Home » HTML » HTML_TreeMenu » Bug #2259
Two nodes (one empty) for only one node in the xml tree
Details
| Submitted | 2004-08-31 16:06 UTC |
|---|---|
| From | pascal dot maes at elec dot ucl dot ac dot be |
| Assigned | richard |
| Status | Bogus |
| Package | HTML_TreeMenu |
| PHP Version | 5.0.0RC3 (Release Candidate 3) |
| OS | Solaris |
| Roadmaps | (Not assigned) |
Comments
[2004-08-31 16:06 UTC] pascal dot maes at elec dot ucl dot ac dot be
Description:
------------
PHP 5.0.0RC3
Solaris 2.9
HTML_TreeMenu 1.1.9
with the xml.example.php given, each node in the xml
tree will give to lines in the treemenu :
newNode = objTreeMenu_1.addItem(new TreeNode('', null,
null, false, true, '', '', null));
newNode = objTreeMenu_1.addItem(new TreeNode('Node 1',
'folder.gif', null, false, true, '', '', 'folder-
expanded.gif'));
The first one is full of "null" but is displayed.
Reproduce code:
---------------
the xml.example.php file provided with the package.
This can be reproduced with another xml tree.
Expected result:
----------------
Only one line per node
[2004-08-31 16:39 UTC] pascal dot maes at elec dot ucl dot ac dot be
It seems that is more a problem from the package
Tree.php (1.0.3)
Here is the output for the $xmlTree variable.
We could see that the first item [0] has null attribute.
The following item [1] matches the first node
This is repeated for all node :
[root] => XML_Tree_Node Object
(
[attributes] => Array
(
)
[children] => Array
(
[0] => XML_Tree_Node Object
(
[attributes] => Array
(
)
[children] => Array
(
)
[content] =>
[name] =>
[namespaces] => Array
(
)
[error] =>
[use_cdata_section] =>
[lineno] => 3
)
[1] => XML_Tree_Node Object
(
[attributes] => Array
(
[text] => Node 1
[icon] => folder.gif
[expandedIcon] =>
folder-expanded.gif
)
...