summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2001-11-16 11:59:04 +0000
committerRasmus Lerdorf <rasmus@php.net>2001-11-16 11:59:04 +0000
commite68a9c6bfa987a26aa4f649d93db6e6a4b92caba (patch)
tree692b4433467a4969231c84c1062d88e4d09dd7e4 /ext
parent1e5e73e0ae516b8bd167915e2c3a2fe6e3c819be (diff)
downloadphp-git-e68a9c6bfa987a26aa4f649d93db6e6a4b92caba.tar.gz
Use the macro here and add an E_NOTICE
Diffstat (limited to 'ext')
-rw-r--r--ext/gd/gd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index ff7ebccd29..4c75b2a08c 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -1592,8 +1592,9 @@ PHP_FUNCTION(imagecolorat)
#if HAVE_LIBGD20
if(gdImageTrueColor(im)) {
if (im->tpixels && gdImageBoundsSafe(im, Z_LVAL_PP(x), Z_LVAL_PP(y))) {
- RETURN_LONG(im->tpixels[Z_LVAL_PP(x)][Z_LVAL_PP(y)]);
+ RETURN_LONG(gdImageTrueColorPixel(im, Z_LVAL_PP(x), Z_LVAL_PP(y)));
} else {
+ php_error(E_NOTICE, "%ld,%ld is out of bounds",Z_LVAL_PP(x), Z_LVAL_PP(y));
RETURN_FALSE;
}
} else {
@@ -1605,6 +1606,7 @@ PHP_FUNCTION(imagecolorat)
RETURN_LONG(im->pixels[Z_LVAL_PP(x)][Z_LVAL_PP(y)]);
#endif
} else {
+ php_error(E_NOTICE, "%ld,%ld is out of bounds",Z_LVAL_PP(x), Z_LVAL_PP(y));
RETURN_FALSE;
}
#if HAVE_LIBGD20