Catch exceptions for images
authorDuck (Jakob Munih) <duck@obala.net>
Tue, 7 Jul 2009 16:33:39 +0000 (18:33 +0200)
committerDuck (Jakob Munih) <duck@obala.net>
Tue, 7 Jul 2009 16:34:11 +0000 (18:34 +0200)
news/pdf.php

index 7e4bbe0..431e417 100644 (file)
@@ -42,8 +42,10 @@ if ($row['picture']) {
     $file = $conf['vfs']['params']['vfsroot'] . '/'
             . News::VFS_PATH . '/images/news/big/'
             . $id . '.' . $conf['images']['image_type'];
-    if (file_exists($file)) {
+    try {
         $pdf->image($file, 120, 20);
+    } catch (Horde_Pdf_Exception $e) {
+        Horde::logMessage($e, __FILE__, __LINE__, PEAR_LOG_INFO)
     }
 }