PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Images » Image_Canvas » Bug #10236

Pie Chart Shading Error when datapoint has 0 value

Details

Submitted2007-03-01 17:46 UTC
Frompeter_wake at hotmail dot com
Assignednosey
StatusClosed
PackageImage_Canvas
PHP VersionIrrelevant
OSIrrelevant
Roadmaps(Not assigned)

Comments

[2007-03-01 17:46 UTC] peter_wake at hotmail dot com

Description:
------------
When datapoints have 0 value, causes error in line 1213:

imagefilledpolygon(): You must have at least 3 points in your array

The solution is to change line 1213 to:

if (($fill = $this->_getFillStyle($fillColor, $x - $rx - 1, $y - $ry - 1, $x + $rx + 1, $y + $ry + 1)) !== false && count($polygon)>2) {

[2007-03-04 19:43 UTC] peter_wake at hotmail dot com

Changed bug summary name