1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 17:22:15 +01:00
This commit is contained in:
Rasmus Lerdorf
2003-04-01 18:50:31 +00:00
parent df22d1016f
commit 423147c194

View File

@@ -3920,17 +3920,9 @@ PHP_FUNCTION(exif_thumbnail)
}
convert_to_string_ex(p_name);
if (arg_c >= 3) {
zval_dtor(*p_width);
zval_dtor(*p_height);
}
if (arg_c >= 4) {
zval_dtor(*p_imagetype);
}
ret = exif_read_file(&ImageInfo, Z_STRVAL_PP(p_name), 1, 0 TSRMLS_CC);
if (ret==FALSE) {
exif_discard_imageinfo(&ImageInfo);
RETURN_FALSE;
}
@@ -3951,10 +3943,13 @@ PHP_FUNCTION(exif_thumbnail)
if (!ImageInfo.Thumbnail.width || !ImageInfo.Thumbnail.height) {
exif_scan_thumbnail(&ImageInfo TSRMLS_CC);
}
zval_dtor(*p_width);
zval_dtor(*p_height);
ZVAL_LONG(*p_width, ImageInfo.Thumbnail.width);
ZVAL_LONG(*p_height, ImageInfo.Thumbnail.height);
}
if (arg_c >= 4) {
zval_dtor(*p_imagetype);
ZVAL_LONG(*p_imagetype, ImageInfo.Thumbnail.filetype);
}
@@ -3984,6 +3979,7 @@ PHP_FUNCTION(exif_imagetype)
if (zend_get_parameters_ex(1, &arg1) == FAILURE)
WRONG_PARAM_COUNT;
convert_to_string_ex(arg1);
stream = php_stream_open_wrapper(Z_STRVAL_PP(arg1), "rb", IGNORE_PATH|ENFORCE_SAFE_MODE|REPORT_ERRORS, NULL);
if (stream == NULL) {