summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph M. Becker <cmb@php.net>2016-07-15 19:47:21 +0200
committerChristoph M. Becker <cmb@php.net>2016-07-15 20:02:44 +0200
commit190fbb94e79c2ba91faa96529603e67ab599b128 (patch)
treebdc55ccc56c601f7edf964af3c016f63398cb930
parentb01b093ca9a46462414323c6abedb4373a58796d (diff)
parent3666cfab973c5aba86d0562d14de8ed74e66cdb7 (diff)
downloadphp-git-190fbb94e79c2ba91faa96529603e67ab599b128.tar.gz
Merge branch 'PHP-5.6' into PHP-7.0
-rw-r--r--NEWS1
-rw-r--r--ext/gd/libgd/gd.c6
-rw-r--r--ext/gd/tests/bug72604.phpt19
3 files changed, 21 insertions, 5 deletions
diff --git a/NEWS b/NEWS
index 6873e924aa..1e3e8c6433 100644
--- a/NEWS
+++ b/NEWS
@@ -33,6 +33,7 @@ PHP NEWS
- GD:
. Fixed bug #72596 (imagetypes function won't advertise WEBP support). (cmb)
+ . Fixed bug #72604 (imagearc() ignores thickness for full arcs). (cmb)
- Intl:
. Partially fixed #72506 (idn_to_ascii for UTS #46 incorrect for long domain
diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c
index bb2f9c23aa..6f71cc183a 100644
--- a/ext/gd/libgd/gd.c
+++ b/ext/gd/libgd/gd.c
@@ -1671,11 +1671,7 @@ long lsqrt (long n)
void gdImageArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e, int color)
{
- if ((s % 360) == (e % 360)) {
- gdImageEllipse(im, cx, cy, w, h, color);
- } else {
- gdImageFilledArc(im, cx, cy, w, h, s, e, color, gdNoFill);
- }
+ gdImageFilledArc(im, cx, cy, w, h, s, e, color, gdNoFill);
}
void gdImageFilledArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e, int color, int style)
diff --git a/ext/gd/tests/bug72604.phpt b/ext/gd/tests/bug72604.phpt
new file mode 100644
index 0000000000..b1dea5e403
--- /dev/null
+++ b/ext/gd/tests/bug72604.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #72604 (imagearc() ignores thickness for full arcs)
+--SKIPIF--
+<?php
+if (!extension_loaded('gd')) die('skip requires ext/gd');
+if (!(imagetypes() & IMG_PNG)) die('skip requires PNG support');
+?>
+--FILE--
+<?php
+$im = imagecreatetruecolor(100, 100);
+imagesetthickness($im, 5);
+imagearc($im, 50, 50, 90, 90, 0, 360, 0xffffff);
+ob_start();
+imagepng($im);
+$imagestring = ob_get_clean();
+echo md5($imagestring);
+?>
+--EXPECT--
+2ffa6afb915afbdf870cf6459477bc8a