rasmus          Tue Apr  1 13:50:31 2003 EDT

  Modified files:              
    /php4/ext/exif      exif.c 
  Log:
  MFB
  
  
Index: php4/ext/exif/exif.c
diff -u php4/ext/exif/exif.c:1.140 php4/ext/exif/exif.c:1.141
--- php4/ext/exif/exif.c:1.140  Sat Jan 18 14:06:29 2003
+++ php4/ext/exif/exif.c        Tue Apr  1 13:50:31 2003
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: exif.c,v 1.140 2003/01/18 19:06:29 helly Exp $ */
+/* $Id: exif.c,v 1.141 2003/04/01 18:50:31 rasmus Exp $ */
 
 /*  ToDos
  *
@@ -95,7 +95,7 @@
 };
 /* }}} */
 
-#define EXIF_VERSION "1.4 $Id: exif.c,v 1.140 2003/01/18 19:06:29 helly Exp $"
+#define EXIF_VERSION "1.4 $Id: exif.c,v 1.141 2003/04/01 18:50:31 rasmus Exp $"
 
 /* {{{ PHP_MINFO_FUNCTION
  */
@@ -3920,17 +3920,9 @@
        }
 
        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 @@
                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 @@
        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) {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to