Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.4.0

Bug #16808 imagefilledpolygon(): You must have at least 3 points in your array
Submitted: 2009-11-20 11:28 UTC
From: ghhoriuchi Assigned: ghhoriuchi
Status: Closed Package: Image_Canvas (version 0.3.2)
PHP Version: Irrelevant OS: Linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 25 + 21 = ?

 
 [2009-11-20 11:28 UTC] ghhoriuchi (Takahiko Horiuchi)
Description: ------------ I got "imagefilledpolygon(): You must have at least 3 points in your array" in Image/Canvas/GD.php. This problem is related to closed and fixed bug #10236. But I still encountered the same problem. So I took the same way, but I changed the code a little bit. The error message said "at least 3 points in your array." I interpreted this as "at least 6 elements in your array." *** /home/sysadmin/GD.php 2009-11-20 11:36:56.123220409 +0900 --- /usr/share/php/Image/Canvas/GD.php 2009-11-20 11:37:25.908995197 +0900 *************** *** 1209,1219 **** $polygon[] = ($y + $ry * sin(deg2rad(max($v1, $v2) % 360))); } ! if ((($fill = $this->_getFillStyle($fillColor, $x - $rx - 1, $y - $ry - 1, $x + $rx + 1, $y + $ry + 1)) !== false) && (count($polygon) > 5)) { ImageFilledPolygon($this->_canvas, $polygon, count($polygon) / 2, $fill); } ! if (($line = $this->_getLineStyle($lineColor)) !== false) { ImagePolygon($this->_canvas, $polygon, count($polygon) / 2, $line); } --- 1209,1219 ---- $polygon[] = ($y + $ry * sin(deg2rad(max($v1, $v2) % 360))); } ! if ((($fill = $this->_getFillStyle($fillColor, $x - $rx - 1, $y - $ry - 1, $x + $rx + 1, $y + $ry + 1)) !== false) && (count($polygon) > 5)) { ImageFilledPolygon($this->_canvas, $polygon, count($polygon) / 2, $fill); } ! if (($line = $this->_getLineStyle($lineColor)) !== false && (count($polygon) > 4)) { ImagePolygon($this->_canvas, $polygon, count($polygon) / 2, $line); }

Comments

 [2010-03-06 11:35 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Feedback
We are unable to reproduce the bug as reported. Please provide a simple script (10 lines or less) or a link to an external script that can be used to reproduce the bug. If you can provide the script, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PEAR.
 [2010-03-26 06:03 UTC] ghhoriuchi (Takahiko Horiuchi)
-Status: Feedback +Status: Closed -Assigned To: +Assigned To: ghhoriuchi
Sorry for being late to replay. I have the source code but I've lost the data which reproduce the situation. So I close this ticket. Thanks for taking your time to examine my ticket.