summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2000-08-22 04:11:57 +0000
committerAndi Gutmans <andi@php.net>2000-08-22 04:11:57 +0000
commitd0e48e92b679c8aa2666fa4b44697c2b27439b30 (patch)
tree14b405a114b887f417453e90871a564774deed81 /ext
parent3a1b4fda7eec68eace9f77556b3e3a84e178644d (diff)
downloadphp-git-d0e48e92b679c8aa2666fa4b44697c2b27439b30.tar.gz
- Cleanup imagetransparent in the GD library
Diffstat (limited to 'ext')
-rw-r--r--ext/gd/gd.c7
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);