From 2cb1682d3ba5f780d2fa6a2e791825a3b3a64833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Fri, 30 Aug 2013 20:59:15 +0200 Subject: [PATCH] Handle when the epub links to an missing resource --HG-- extra : rebase_source : bda1e6e6af63284907e326790fbe85946a907a7e --- resources/php-epub-meta/epub.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/php-epub-meta/epub.php b/resources/php-epub-meta/epub.php index 18d99f8..998dc19 100644 --- a/resources/php-epub-meta/epub.php +++ b/resources/php-epub-meta/epub.php @@ -168,7 +168,8 @@ class EPub { $path = str_replace ("-SLASH-", "/", $comp); $path = $this->getFullPath ($path, $elementPath); if (!$this->zip->FileExists($path)) { - throw new Exception ("Unable to find " . $path); + error_log ("Unable to find " . $path); + return false; } return str_replace ("/", "-SLASH-", $path); }