From 9818f863c3b5e87b7b81b5d66c4be585ab169102 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sun, 11 Aug 2019 16:05:53 +0200 Subject: [PATCH] Fix parameter order `imagecopymerge()` and `imagecopymergegray()` expect the destination image first, not the other way round. --- ext/gd/gd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 54f6b77678..b6868f53eb 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -666,8 +666,8 @@ ZEND_BEGIN_ARG_INFO(arginfo_imagecopy, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO(arginfo_imagecopymerge, 0) - ZEND_ARG_INFO(0, src_im) ZEND_ARG_INFO(0, dst_im) + ZEND_ARG_INFO(0, src_im) ZEND_ARG_INFO(0, dst_x) ZEND_ARG_INFO(0, dst_y) ZEND_ARG_INFO(0, src_x) @@ -678,8 +678,8 @@ ZEND_BEGIN_ARG_INFO(arginfo_imagecopymerge, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO(arginfo_imagecopymergegray, 0) - ZEND_ARG_INFO(0, src_im) ZEND_ARG_INFO(0, dst_im) + ZEND_ARG_INFO(0, src_im) ZEND_ARG_INFO(0, dst_x) ZEND_ARG_INFO(0, dst_y) ZEND_ARG_INFO(0, src_x) @@ -3811,7 +3811,7 @@ PHP_FUNCTION(imagecopy) } /* }}} */ -/* {{{ 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) +/* {{{ 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) Merge one part of an image with another */ PHP_FUNCTION(imagecopymerge) { @@ -3845,7 +3845,7 @@ PHP_FUNCTION(imagecopymerge) } /* }}} */ -/* {{{ 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) +/* {{{ 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) Merge one part of an image with another */ PHP_FUNCTION(imagecopymergegray) { -- 2.40.0