@@ -1095,6 +1095,7 @@
 zval *IM;
 long red, green, blue, alpha;
 gdImagePtr im;
+ int ct = (-1);

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zllll", &IM, &red, &green, &blue, &alpha) == FAILURE) {
 RETURN_FALSE;
@@ -1103,6 +1104,12 @@
 ZEND_FETCH_RESOURCE(im, gdImagePtr, &IM, -1, "Image", le_gd);


you forgot to remove the line below:

 RETURN_LONG(gdImageColorAllocateAlpha(im, red, green, blue, alpha));


+ ct = gdImageColorAllocateAlpha(im, red, green, blue, alpha);
+ if (ct < 0) {
+ RETURN_FALSE;
+ }
+
+ RETURN_LONG((long)ct);
}
/* }}} */


Nuno
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to