From d0e48e92b679c8aa2666fa4b44697c2b27439b30 Mon Sep 17 00:00:00 2001 From: Andi Gutmans Date: Tue, 22 Aug 2000 04:11:57 +0000 Subject: [PATCH] - Cleanup imagetransparent in the GD library --- ext/gd/gd.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 582e6a28c0..3585407390 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -1391,7 +1391,7 @@ PHP_FUNCTION(imagecolorstotal) Define a color as transparent */ PHP_FUNCTION(imagecolortransparent) { - zval **IM, **COL = NULL; + zval **IM, **COL; gdImagePtr im; int col; GDLS_FETCH(); @@ -1414,9 +1414,8 @@ PHP_FUNCTION(imagecolortransparent) ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, "Image", GDG(le_gd)); - if (COL != NULL && (*COL) != NULL) { - col = (*COL)->value.lval; - gdImageColorTransparent(im,col); + if (ZEND_NUM_ARGS() > 1) { + gdImageColorTransparent(im, Z_LVAL_PP(COL)); } col = gdImageGetTransparent(im); RETURN_LONG(col); -- 2.50.1