From 0652302423f027f5fa7ba002f8d287b0058d8b18 Mon Sep 17 00:00:00 2001 From: Anton Karakulov Date: Sun, 19 Jun 2016 15:27:01 +0300 Subject: [PATCH] add info about Invalid image if there are many images in document are used and one of them throws `InvalidImageException` it is very difficult to detect which one without any message here... --- src/PhpWord/Element/Image.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpWord/Element/Image.php b/src/PhpWord/Element/Image.php index f5cc7ccc..57f52f8a 100644 --- a/src/PhpWord/Element/Image.php +++ b/src/PhpWord/Element/Image.php @@ -383,7 +383,7 @@ class Image extends AbstractElement $imageData = @getimagesize($source); } if (!is_array($imageData)) { - throw new InvalidImageException(); + throw new InvalidImageException(sprintf('Invalid image: %s', $source)); } list($actualWidth, $actualHeight, $imageType) = $imageData;