Skip to content

Commit 9818f86

Browse files
committed
Fix parameter order
`imagecopymerge()` and `imagecopymergegray()` expect the destination image first, not the other way round.
1 parent 092571c commit 9818f86

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/gd/gd.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,8 @@ ZEND_BEGIN_ARG_INFO(arginfo_imagecopy, 0)
666666
ZEND_END_ARG_INFO()
667667

668668
ZEND_BEGIN_ARG_INFO(arginfo_imagecopymerge, 0)
669-
ZEND_ARG_INFO(0, src_im)
670669
ZEND_ARG_INFO(0, dst_im)
670+
ZEND_ARG_INFO(0, src_im)
671671
ZEND_ARG_INFO(0, dst_x)
672672
ZEND_ARG_INFO(0, dst_y)
673673
ZEND_ARG_INFO(0, src_x)
@@ -678,8 +678,8 @@ ZEND_BEGIN_ARG_INFO(arginfo_imagecopymerge, 0)
678678
ZEND_END_ARG_INFO()
679679

680680
ZEND_BEGIN_ARG_INFO(arginfo_imagecopymergegray, 0)
681-
ZEND_ARG_INFO(0, src_im)
682681
ZEND_ARG_INFO(0, dst_im)
682+
ZEND_ARG_INFO(0, src_im)
683683
ZEND_ARG_INFO(0, dst_x)
684684
ZEND_ARG_INFO(0, dst_y)
685685
ZEND_ARG_INFO(0, src_x)
@@ -3811,7 +3811,7 @@ PHP_FUNCTION(imagecopy)
38113811
}
38123812
/* }}} */
38133813

3814-
/* {{{ proto bool imagecopymerge(resource src_im, resource dst_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct)
3814+
/* {{{ proto bool imagecopymerge(resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct)
38153815
Merge one part of an image with another */
38163816
PHP_FUNCTION(imagecopymerge)
38173817
{
@@ -3845,7 +3845,7 @@ PHP_FUNCTION(imagecopymerge)
38453845
}
38463846
/* }}} */
38473847

3848-
/* {{{ proto bool imagecopymergegray(resource src_im, resource dst_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct)
3848+
/* {{{ proto bool imagecopymergegray(resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct)
38493849
Merge one part of an image with another */
38503850
PHP_FUNCTION(imagecopymergegray)
38513851
{

0 commit comments

Comments
 (0)