Update of /cvsroot/mantisbt/mantisbt/core
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14382
Modified Files:
graphviz_api.php
Log Message:
Workaround to partially fix bug #4625
Index: graphviz_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/graphviz_api.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- graphviz_api.php 25 Sep 2004 14:16:08 -0000 1.1
+++ graphviz_api.php 14 Oct 2004 17:24:28 -0000 1.2
@@ -269,7 +269,13 @@
if ( 'WIN' == substr( PHP_OS, 0, 3 ) ) {
# If we are under Windows, we use the COM
interface provided
# by WinGraphviz. Thanks Paul!
-
+ # Issue #4625: Work around WinGraphviz bug that
fails with
+ # graphs with zero or one node. It is probably
too much to
+ # generate a graphic output just to explain it
to the user,
+ # so we just return a null content.
+ if ( count( $this->nodes ) <= 1 )
+ return;
+
$t_graphviz = new COM(
$this->graphviz_com_module );
# Check if we managed to instantiate the COM
object.
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
|