From aa405f4114e9cb275c8adfe6dd0bc7f4037794e7 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Sun, 7 Sep 2003 23:50:25 +0000 Subject: [PATCH] MFH: Allow to search for section FILE with 2nd parameter (found by Derick) --- ext/exif/exif.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/exif/exif.c b/ext/exif/exif.c index e8227648b0..82c154a3bb 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -3791,15 +3791,17 @@ PHP_FUNCTION(exif_read_data) exif_error_docref(NULL TSRMLS_CC, &ImageInfo, E_NOTICE, "sections found: %s", sections_str[0] ? sections_str : "None"); #endif - ImageInfo.sections_found |= FOUND_COMPUTED;/* do not inform about in debug*/ + ImageInfo.sections_found |= FOUND_COMPUTED|FOUND_FILE;/* do not inform about in debug*/ - if (ret==FALSE || (sections_needed && !(sections_needed&ImageInfo.sections_found)) || array_init(return_value) == FAILURE) { + if (ret==FALSE || (sections_needed && !(sections_needed&ImageInfo.sections_found))) { /* array_init must be checked at last! otherwise the array must be freed if a later test fails. */ exif_discard_imageinfo(&ImageInfo); EFREE_IF(sections_str); RETURN_FALSE; } + array_init(return_value); + #ifdef EXIF_DEBUG exif_error_docref(NULL TSRMLS_CC, &ImageInfo, E_NOTICE, "generate section FILE"); #endif -- 2.50.1