Skip to content

Commit 1aac85b

Browse files
committed
- Be more verbose which index causes the warning.
1 parent 9fea4c1 commit 1aac85b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ext/gd/gd.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -1714,7 +1714,8 @@ PHP_FUNCTION(imagecolordeallocate)
17141714
gdImageColorDeallocate(im, col);
17151715
RETURN_TRUE;
17161716
} else {
1717-
php_error(E_WARNING, "Color index out of range");
1717+
php_error(E_WARNING, "%s() color index %d out of range",
1718+
get_active_function_name(TSRMLS_C), col);
17181719
RETURN_FALSE;
17191720
}
17201721
}
@@ -1830,7 +1831,8 @@ PHP_FUNCTION(imagecolorsforindex)
18301831
}
18311832
#endif
18321833
else {
1833-
php_error(E_WARNING, "Color index out of range");
1834+
php_error(E_WARNING, "%s() color index %d out of range",
1835+
get_active_function_name(TSRMLS_C), col);
18341836
RETURN_FALSE;
18351837
}
18361838
}

0 commit comments

Comments
 (0)