Item10778: Gauges don't work with some versions of GD
Priority: Urgent
Current State: Closed
Released In: n/a
Target Release: n/a
I have two servers with GD installed, and both exhibit the problem that when GD::Polygon is called, I get an uninitialised variable error in the midst of the code. Tracking it back, it's due to the lack of two undocumented parameters to GD::Polygon->scale. The call that is there is correct according to the docco, but when you read down through the code it's bound to cause an uninitalised var :-(.
Relevant code:
- GD version 2.45
- GaugePlugin.pm: 271 (works if you add
, 0, 0
to the parameters)
- GD::Polygon: 180 -> 173 falls over because $tx, $ty are undefined
As far as I can see the error is clearly in the GD code. But I don't understand how
GaugePlugin can ever have worked (or how GD works, for that matter!).
As I said, changing
GaugePlugin.pm:271 to:
$poly->scale( $xscale, 1, 0, 0 );
cures the problem (or at least masks it)
This code is identical in GD 2.46 (the latest)
--
CrawfordCurrie - 26 May 2011
Put the fix described above in. Seems ok on all revs of GD I tested.
--
CrawfordCurrie - 14 Jun 2011