Better error message

This commit is contained in:
Laurent Destailleur 2019-03-24 14:26:16 +01:00
parent fad6efd86c
commit 949ef79227
2 changed files with 2 additions and 2 deletions

View File

@ -1834,7 +1834,8 @@ function dol_convert_file($fileinput, $ext = 'png', $fileoutput = '')
try {
$ret = $image->readImage($fileinput);
} catch(Exception $e) {
dol_syslog("Failed to read image using Imagick (Try to install package 'apt-get install ghostscript'): ".$e->getMessage(), LOG_WARNING);
$ext = pathinfo($fileinput, PATHINFO_EXTENSION);
dol_syslog("Failed to read image using Imagick (Try to install package 'apt-get install php-imagick ghostscript' and check there is no policy to disable ".$ext." convertion in /etc/ImageMagick*/policy.xml): ".$e->getMessage(), LOG_WARNING);
return 0;
}
if ($ret)

View File

@ -1393,7 +1393,6 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
// If PDF file exists
if (file_exists($file))
{
$encfile = urlencode($file);
// Conversion du PDF en image png si fichier png non existant
if ( (! file_exists($fileimage) || (filemtime($fileimage) < filemtime($file)))
&& (! file_exists($fileimagebis) || (filemtime($fileimagebis) < filemtime($file)))