Fixed bug #1471: Check if exif functions are available before using them.
authorAndreas Otto <andreas.otto@dkd.de>
Mon, 24 Sep 2007 12:11:24 +0000 (12:11 +0000)
committerAndreas Otto <andreas.otto@dkd.de>
Mon, 24 Sep 2007 12:11:24 +0000 (12:11 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-1@2520 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/indexed_search/ChangeLog
typo3/sysext/indexed_search/class.external_parser.php

index 7d9e698..2b292bb 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-09-24 Andreas Otto <andreas.otto@dkd.de>
+
+       * Fixed bug #1471: Check if exif functions are available before using them.
+
 2007-09-18  Oliver Hader  <oh@inpublica.de>
 
        * (minor) Fixed bug #65: Thumbnails in Element Browser are only displayed if fileSuffix is lowercase
@@ -8,7 +12,7 @@
 
 2007-09-09  Martin Kutschker  <martin.t.kutschker@blackbox.net>
 
-       * Require PHP 4.3 explicitely in init.php 
+       * Require PHP 4.3 explicitely in init.php
 
 2007-09-07  Ingmar Schlecht  <ingmar@typo3.org>
 
index da047e4..2b7f634 100755 (executable)
@@ -1,3 +1,7 @@
+2007-09-24 Andreas Otto <andreas.otto@dkd.de>
+
+       * Fixed bug #1471: Check if exif functions are available before using them.
+
 2007-07-06  Michael Stucki  <michael@typo3.org>
 
        * Fix: List of indexed pages could be broken if mutli-byte chars are cut in the middle (patch by Karsten Dambekalns)
index 6bab688..a3f3ffc 100755 (executable)
@@ -496,7 +496,12 @@ class tx_indexed_search_extparse {
                        case 'jpg':             // PHP EXIF
                        case 'jpeg':    // PHP EXIF
                        case 'tif':             // PHP EXIF
-                               $exif = exif_read_data($absFile, 'IFD0');
+                               if (function_exists('exif_read_data'))  {
+                                       $exif = exif_read_data($absFile, 'IFD0');
+                               } else {
+                                       $exif = FALSE;
+                               }
+
                                if ($exif)      {
                                        $comment = trim($exif['COMMENT'][0].' '.$exif['ImageDescription']);     // The comments in JPEG files are utf-8, while in Tif files they are 7-bit ascii.
                                } else {