Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Better catch of imagick call error.
  • Loading branch information
cdujeu committed Dec 31, 2015
1 parent 45d5cd8 commit 0409cf4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/plugins/editor.imagick/class.IMagickPreviewer.php
Expand Up @@ -321,6 +321,9 @@ public function generateJpegsCallback($masterFile, $targetFile)
if (is_array($out) && count($out)) {
throw new AJXP_Exception(implode("\n", $out));
}
if(!is_file($tmpFileThumb)){
throw new AJXP_Exception("Error while converting PDF file to JPG thumbnail. Return code '$return'. Command used '".$this->getFilteredOption("IMAGE_MAGICK_CONVERT")."': is the binary at the correct location? Is the server allowed to use it?");
}
if (!$this->extractAll) {
rename($tmpFileThumb, $targetFile);
if ($isStream) {
Expand Down

0 comments on commit 0409cf4

Please sign in to comment.