From f8ee4cea98c218cea233348d6010ac07f992cdc5 Mon Sep 17 00:00:00 2001 From: Romain d'Alverny Date: Wed, 25 May 2011 17:17:19 +0000 Subject: check if exif_read_data() is here --- index.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/index.php b/index.php index 14f2883..cc0a84c 100644 --- a/index.php +++ b/index.php @@ -27,15 +27,17 @@ if (count($images) > 0) { $out = sprintf($img_tmpl, str_replace($app_root, '', $img)); - // TIP use jhead -ce photo.jpg to edit photo COMMENT field - $exif = exif_read_data($img, null, true); - if (!is_null($exif) - && isset($exif['COMMENT'])) { + if (function_exists('exif_read_data')) { + // TIP use jhead -ce photo.jpg to edit photo COMMENT field + $exif = exif_read_data($img, null, true); + if (!is_null($exif) + && isset($exif['COMMENT'])) { - $out .= sprintf('
%s
', - nl2br(preg_replace('`((?:https?|ftp)://\S+[[:alnum:]]/?)`si', - '$1', - trim($exif['COMMENT'][0])))); + $out .= sprintf('
%s
', + nl2br(preg_replace('`((?:https?|ftp)://\S+[[:alnum:]]/?)`si', + '$1', + trim($exif['COMMENT'][0])))); + } } $out = sprintf('
%s
', $out); -- cgit v1.2.1