Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.3.0

Bug #13053 parse error for cluster attributes
Submitted: 2008-02-04 10:29 UTC
From: anshumv Assigned:
Status: No Feedback Package: Image_GraphViz (version 1.2.1)
PHP Version: 5.2.2 OS: FreeBSD 4.11
Roadmaps: (Not assigned)    
Subscription  


 [2008-02-04 10:29 UTC] anshumv (Anshum Verma)
Description: ------------ The cluster attributes need to be separated by semicolon (;) in DOT format but they are wrongly parsed and are separated by comma (,). The fix is to change line 478 in GraphViz.php: Current: $parsedGraph .= implode(',', $attributeList) . ";\n"; Change to: $parsedGraph .= implode(';', $attributeList) . ";\n"; Test script: --------------- <?php include "Image/GraphViz.php"; $graph = new Image_GraphViz(); $graph->setDirected(true); $graph->addNode('Node1',array('label'=>'Node1'),'cluster_1'); $graph->addNode('Node2',array('label'=>'Node2'),'cluster_1'); $graph->addNode('Node3',array('label'=>'Node3'),'cluster_2'); $graph->addNode('Node4',array('label'=>'Node4'),'cluster_2'); $graph->addCluster('cluster_1','Cluster - 1',array('bgcolor'=>'grey90','label'=>'cluster_1')); $graph->addCluster('cluster_2','Cluster - 2',array('bgcolor'=>'grey90','label'=>'cluster_2')); print $graph->parse(); ?> Expected result: ---------------- digraph G { subgraph "cluster_cluster_1" { label="Cluster - 1"; bgcolor="grey90";label="cluster_1"; "Node1" [ label="Node1" ]; "Node2" [ label="Node2" ]; } subgraph "cluster_cluster_2" { label="Cluster - 2"; bgcolor="grey90";label="cluster_2"; "Node3" [ label="Node3" ]; "Node4" [ label="Node4" ]; } } Actual result: -------------- digraph G { subgraph "cluster_cluster_1" { label="Cluster - 1"; bgcolor="grey90",label="cluster_1"; "Node1" [ label="Node1" ]; "Node2" [ label="Node2" ]; } subgraph "cluster_cluster_2" { label="Cluster - 2"; bgcolor="grey90",label="cluster_2"; "Node3" [ label="Node3" ]; "Node4" [ label="Node4" ]; } }

Comments

 [2008-02-05 17:08 UTC] jausions (Philippe Jausions)
Thank you for taking the time to report a problem with the package. Unfortunately you are not using a current version of the package -- the problem might already be fixed. Please download a new version from http://pear.php.net/packages.php If you are able to reproduce the bug with one of the latest versions, please change the package version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PEAR.
 [2008-02-22 01:52 UTC] jausions (Philippe Jausions)
No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you.