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

index a3a9b4ff1986ff3066c6752307445a27c5e6cf93..5d33a447e99a51d2bbde75188ef51ce9d3e0efd4 100644 (file)
@@ -3816,15 +3816,17 @@ PHP_FUNCTION(exif_read_data)
                exif_error_docref(NULL EXIFERR_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 EXIFERR_CC, &ImageInfo, E_NOTICE, "Generate section FILE");
 #endif