mirror of
https://github.com/php/php-src.git
synced 2026-04-28 02:33:17 +02:00
Applied imagedeallocate() fix
This commit is contained in:
@@ -1867,6 +1867,13 @@ PHP_FUNCTION(imagecolordeallocate)
|
||||
|
||||
ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, "Image", le_gd);
|
||||
|
||||
#if HAVE_LIBGD20
|
||||
/* We can return right away for a truecolor image as deallocating colours is meaningless here */
|
||||
if (gdImageTrueColor(im)) {
|
||||
RETURN_TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
convert_to_long_ex(index);
|
||||
col = Z_LVAL_PP(index);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user