[rt-users] Still having problems with GD and RT 3.6.0pre1

Jesse Vincent jesse at bestpractical.com
Fri Apr 28 12:22:59 EDT 2006


Can you try this patch to RT? It should work with other GD versions 


--- Chart       (revision 12018)
+++ Chart       (local)
@@ -76,7 +76,15 @@ while ( my $entry = $tix->Next ) {
     }

     my $plot = $chart->plot( [ [@keys], [@values] ] ) or die $chart->error;
-    $r->content_type('image/png');
-    $m->out( $plot->png );
+    if ($plot->can('png') ) {
+        $r->content_type('image/png');
+        $m->out( $plot->png );
+    } elsif ($plot->can('gif')) {
+        $r->content_type('image/gif');
+        $m->out( $plot->gif );
+
+    } else {
+        die "Your GD library appears to support neither PNG nor GIF";
+    }
     $m->abort();
 </%init>




More information about the rt-users mailing list