History log of /PHP-8.2/ext/gd/tests/bug55005.phpt (Results 1 – 7 of 7)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# e1285c4a 21-Mar-2021 Christoph M. Becker

Deprecate $num_points parameter of image(open|filled)polygon

Cf. <https://wiki.php.net/rfc/deprecations_php_8_1#num_points_parameter_of_image_open_filled_polygon>.

Co-authored-by: M

Deprecate $num_points parameter of image(open|filled)polygon

Cf. <https://wiki.php.net/rfc/deprecations_php_8_1#num_points_parameter_of_image_open_filled_polygon>.

Co-authored-by: Máté Kocsis <kocsismate@woohoolabs.com>
Co-authored-by: George Peter Banyard <7906688+Girgias@users.noreply.github.com>

Closes GH-6789.

show more ...


# a375d547 16-May-2021 Christoph M. Becker

Migrate skip checks to --EXTENSIONS-- for ext/gd

Cf. PR #6787.

Closes GH-6994.


# 14a26db3 09-Oct-2020 Nikita Popov

Update ext/gd parameter names

Closes GH-6308.


# 0c6d06ec 29-Jun-2020 Fabien Villepinte

Replace EXPECTF when possible

Closes GH-5779


# 50765075 01-Apr-2020 Máté Kocsis

Improve some ValueError messages

Closes GH-5340


Revision tags: php-7.3.13RC1, php-7.2.26RC1, php-7.4.0, php-7.2.25, php-7.3.12
# 2de79f08 14-Nov-2019 Christoph M. Becker

Make the $num_points parameter of php_imagepolygon optional

That parameter is mostly useless in practise, and likely has been
directly ported from the underlying `gdImagePolygon()` and f

Make the $num_points parameter of php_imagepolygon optional

That parameter is mostly useless in practise, and likely has been
directly ported from the underlying `gdImagePolygon()` and friends,
which require that parameter since the number of elements of the point
array would otherwise be unknown. Typical usages of `imagepolygon()`,
`imageopenpolygon()` and `imagefilledpolygon()` pass `count($points)/2`
or hard-code this value as literal. Since explicitly specifying this
parameter is annoying and error-prone, we offer the possibility to omit
it, in which case the `$points` array must have an even number of
elements, and the number of points is calculated as `count($points)/2`.

show more ...


Revision tags: php-7.4.0RC6, php-7.3.12RC1, php-7.2.25RC1
# 7d96dcac 02-Nov-2019 Christoph M. Becker

Fix #55005: imagepolygon num_points requirement

We actually have to check `$num_points` instead of `2*count($points)`,
because the latter may be greater than the former, but not all elem

Fix #55005: imagepolygon num_points requirement

We actually have to check `$num_points` instead of `2*count($points)`,
because the latter may be greater than the former, but not all elements
of `$points` are guaranteed to be used. This allowed to pass arrays
with excess elements to draw polygons with less than three vertices.

While the current implementation of `gdImagePolygon()` and friends
would allow us to draw monogons and digons, we don't allow that
anymore, because the respective drawing primitives work slightly
different (e.g. drawing lines support anti-aliasing, but drawing
general polygons does not).

To minimize the BC break, we do not fix this longstanding issue for PHP
7, but target PHP 8 only.

show more ...