View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0012336 | mantisbt | reports | public | 2010-09-10 05:18 | 2014-12-08 02:08 |
Reporter | gthomas | Assigned To | dhx | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.3.0dev | ||||
Target Version | 1.3.0-beta.1 | ||||
Summary | 0012336: Syntax error in graphviz_api.php on line 435 | ||||
Description | Seems to be an indentation-implied plus closing brace error. | ||||
Additional Information | Patch attached. | ||||
Tags | patch | ||||
Attached Files | graphviz_syntax_error.patch (2,050 bytes)
From 6880e367d948b36d412dba8deef4a645da3247d3 Mon Sep 17 00:00:00 2001 From: Gulacsi Tamas <tgulacsi@websrv.unosoft.dmz> Date: Fri, 10 Sep 2010 10:58:20 +0200 Subject: [PATCH] fix graphiz_api indentation and syntax error diff --git a/core/graphviz_api.php b/core/graphviz_api.php old mode 100644 new mode 100755 index 125cbff..b10aed1 --- a/core/graphviz_api.php +++ b/core/graphviz_api.php @@ -338,33 +338,32 @@ class Graph { 2 => array( 'file', 'php://stderr', 'w', ), ); - $t_pipes = array(); - $t_proccess = proc_open( $t_command, $t_descriptors, $t_pipes ); - - if( is_resource( $t_proccess ) ) { - # Filter generated output through dot - fwrite( $t_pipes[0], $t_dot_source ); - fclose( $t_pipes[0] ); - - if( $p_headers ) { - # Headers were requested, use another output buffer to - # retrieve the size for Content-Length. - ob_start(); - while( !feof( $t_pipes[1] ) ) { - echo fgets( $t_pipes[1], 1024 ); - } - header( 'Content-Length: ' . ob_get_length() ); - ob_end_flush(); - } else { - # No need for headers, send output directly. - while( !feof( $t_pipes[1] ) ) { - print( fgets( $t_pipes[1], 1024 ) ); - } + $t_pipes = array(); + $t_proccess = proc_open( $t_command, $t_descriptors, $t_pipes ); + + if( is_resource( $t_proccess ) ) { + # Filter generated output through dot + fwrite( $t_pipes[0], $t_dot_source ); + fclose( $t_pipes[0] ); + + if( $p_headers ) { + # Headers were requested, use another output buffer to + # retrieve the size for Content-Length. + ob_start(); + while( !feof( $t_pipes[1] ) ) { + echo fgets( $t_pipes[1], 1024 ); + } + header( 'Content-Length: ' . ob_get_length() ); + ob_end_flush(); + } else { + # No need for headers, send output directly. + while( !feof( $t_pipes[1] ) ) { + print( fgets( $t_pipes[1], 1024 ) ); } - - fclose( $t_pipes[1] ); - proc_close( $t_proccess ); } + + fclose( $t_pipes[1] ); + proc_close( $t_proccess ); } } -- 1.5.4.3 | ||||
The product version for this issue is set to "git trunk". I am personally running 1.2.3 from the site. Should the file have significantly changed between the 1.2.x branch and the current trunk, ignore me. Otherwise: I applied this patch because I couldn't get graphviz to run with Mantis, despite the fact that it works fine when called manually. I am now getting an error Normal diff shows a bunch of tab changes, diff -w shows exactly one change:
Long story short: As far as I can tell, the original version was alright (didn't throw an error), and the patched version causes an error. As said, if this doesn't apply because trunk and 1.2.x differ in that file, ignore me. Just thought I'd make note of it, especially since others might get the same idea. |
|
1.2.x is totally different from git-trunk: index 44d43e8..b10aed1 MantisBT is free software: you can redistribute it and/or modifyit under the terms of the GNU General Public License as published by@@ -15,25 +15,31 @@ along with MantisBT. If not, see http://www.gnu.org/licenses/./**
+require_api( 'constant_inc.php' );
|
|
Well as said...at least others running 1.2.x won't get the same idea now. A clearer version marking than "trunk" would help avoid such confusion, btw. |
|
Thanks for the patch Gulacsi, I have finally committed it. Apologies for the delayed commit. This problem only affected version 1.3.x of MantisBT (not 1.2.x). |
|
Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch |
|
MantisBT: master 0ed24722 2010-09-10 04:58 Gulacsi Tamas Committer: David Hicks Details Diff |
fix graphiz_api indentation and syntax error Signed-off-by: David Hicks <hickseydr@optusnet.com.au> |
Affected Issues 0012336 |