Skip to content

Commit 0652302

Browse files
authored
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...
1 parent 508d619 commit 0652302

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhpWord/Element/Image.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ private function checkImage($source)
383383
$imageData = @getimagesize($source);
384384
}
385385
if (!is_array($imageData)) {
386-
throw new InvalidImageException();
386+
throw new InvalidImageException(sprintf('Invalid image: %s', $source));
387387
}
388388
list($actualWidth, $actualHeight, $imageType) = $imageData;
389389

0 commit comments

Comments
 (0)