diff options
author | Andi Gutmans <andi@php.net> | 2000-08-22 04:11:57 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 2000-08-22 04:11:57 +0000 |
commit | d0e48e92b679c8aa2666fa4b44697c2b27439b30 (patch) | |
tree | 14b405a114b887f417453e90871a564774deed81 /ext | |
parent | 3a1b4fda7eec68eace9f77556b3e3a84e178644d (diff) | |
download | php-git-d0e48e92b679c8aa2666fa4b44697c2b27439b30.tar.gz |
- Cleanup imagetransparent in the GD library
Diffstat (limited to 'ext')
-rw-r--r-- | ext/gd/gd.c | 7 |
1 files 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); |