Permalink
Browse files

Suggested fix for issue #19286

git-svn-id: http://svn.php.net/repository/pear/packages/Image_GraphViz/trunk@325642 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent fe3db20 commit 8ceed09f950884a3347942b76e632cee1d389dd6 @CloCkWeRX CloCkWeRX committed May 10, 2012
Showing with 11 additions and 6 deletions.
  1. +11 −6 Image/GraphViz.php
View
@@ -7,7 +7,7 @@
*
* PHP version 4 and 5
*
- * Copyright (c) 2001-2007, Dr. Volker Göbbels <vmg@arachnion.de> and
+ * Copyright (c) 2001-2007, Dr. Volker Göbbels <vmg@arachnion.de> and
* Sebastian Bergmann <sb@sebastian-bergmann.de>. All rights reserved.
*
* LICENSE: This source file is subject to version 3.0 of the PHP license
@@ -18,12 +18,12 @@
*
* @category Image
* @package Image_GraphViz
- * @author Dr. Volker Göbbels <vmg@arachnion.de>
+ * @author Dr. Volker Göbbels <vmg@arachnion.de>
* @author Sebastian Bergmann <sb@sebastian-bergmann.de>
* @author Karsten Dambekalns <k.dambekalns@fishfarm.de>
* @author Michael Lively Jr. <mlively@ft11.net>
* @author Philippe Jausions <Philippe.Jausions@11abacus.com>
- * @copyright 2001-2007 Dr. Volker Göbbels <vmg@arachnion.de> and Sebastian Bergmann <sb@sebastian-bergmann.de>
+ * @copyright 2001-2007 Dr. Volker Göbbels <vmg@arachnion.de> and Sebastian Bergmann <sb@sebastian-bergmann.de>
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version CVS: $Id$
* @link http://pear.php.net/package/Image_GraphViz
@@ -98,11 +98,11 @@
* @category Image
* @package Image_GraphViz
* @author Sebastian Bergmann <sb@sebastian-bergmann.de>
- * @author Dr. Volker Göbbels <vmg@arachnion.de>
+ * @author Dr. Volker Göbbels <vmg@arachnion.de>
* @author Karsten Dambekalns <k.dambekalns@fishfarm.de>
* @author Michael Lively Jr. <mlively@ft11.net>
* @author Philippe Jausions <Philippe.Jausions@11abacus.com>
- * @copyright 2001-2007 Dr. Volker Göbbels <vmg@arachnion.de> and Sebastian Bergmann <sb@sebastian-bergmann.de>
+ * @copyright 2001-2007 Dr. Volker Göbbels <vmg@arachnion.de> and Sebastian Bergmann <sb@sebastian-bergmann.de>
* @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0
* @version Release: @package_version@
* @link http://pear.php.net/package/Image_GraphViz
@@ -400,6 +400,9 @@ function addCluster($id, $title, $attributes = array(), $group = 'default')
$this->graph['clusters'][$id]['title'] = $title;
$this->graph['clusters'][$id]['attributes'] = $attributes;
$this->graph['clusters'][$id]['embedIn'] = $group;
+ if (!isset($this->graph['nodes'][$id])) {
+ $this->graph['nodes'][$id] = array();
+ }
}
/**
@@ -418,6 +421,9 @@ function addSubgraph($id, $title, $attributes = array(), $group = 'default')
$this->graph['subgraphs'][$id]['title'] = $title;
$this->graph['subgraphs'][$id]['attributes'] = $attributes;
$this->graph['subgraphs'][$id]['embedIn'] = $group;
+ if (!isset($this->graph['nodes'][$id])) {
+ $this->graph['nodes'][$id] = array();
+ }
}
/**
@@ -1028,4 +1034,3 @@ function saveParsedGraph($file = '')
* c-hanging-comment-ender-p: nil
* End:
*/
-?>

0 comments on commit 8ceed09

Please sign in to comment.