summaryrefslogtreecommitdiff
path: root/ext/standard/image.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/image.c')
-rw-r--r--ext/standard/image.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/standard/image.c b/ext/standard/image.c
index 4749f03ec8..5c1578faf6 100644
--- a/ext/standard/image.c
+++ b/ext/standard/image.c
@@ -347,7 +347,11 @@ PHP_FUNCTION(getimagesize)
result = php3_handle_gif (fp);
itype = 1;
} else if (!memcmp(filetype, php3_sig_jpg, 3)) {
- result = php3_handle_jpeg(fp,*info);
+ if (info) {
+ result = php3_handle_jpeg(fp,*info);
+ } else {
+ result = php3_handle_jpeg(fp,NULL);
+ }
itype = 2;
} else if (!memcmp(filetype, php3_sig_png, 3)) {
fseek(fp, 0L, SEEK_SET);