]> granicus.if.org Git - php/commitdiff
MFH: Allow to search for section FILE with 2nd parameter (found by Derick)
authorMarcus Boerger <helly@php.net>
Sun, 7 Sep 2003 23:50:25 +0000 (23:50 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 7 Sep 2003 23:50:25 +0000 (23:50 +0000)
ext/exif/exif.c

index e8227648b087220c56ad844843c4a80aec07dafa..82c154a3bb40d464d42bd1ae639940907ab3f873 100644 (file)
@@ -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