Better error message
This commit is contained in:
parent
fad6efd86c
commit
949ef79227
@ -1834,7 +1834,8 @@ function dol_convert_file($fileinput, $ext = 'png', $fileoutput = '')
|
|||||||
try {
|
try {
|
||||||
$ret = $image->readImage($fileinput);
|
$ret = $image->readImage($fileinput);
|
||||||
} catch(Exception $e) {
|
} 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;
|
return 0;
|
||||||
}
|
}
|
||||||
if ($ret)
|
if ($ret)
|
||||||
|
|||||||
@ -1393,7 +1393,6 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
|
|||||||
// If PDF file exists
|
// If PDF file exists
|
||||||
if (file_exists($file))
|
if (file_exists($file))
|
||||||
{
|
{
|
||||||
$encfile = urlencode($file);
|
|
||||||
// Conversion du PDF en image png si fichier png non existant
|
// Conversion du PDF en image png si fichier png non existant
|
||||||
if ( (! file_exists($fileimage) || (filemtime($fileimage) < filemtime($file)))
|
if ( (! file_exists($fileimage) || (filemtime($fileimage) < filemtime($file)))
|
||||||
&& (! file_exists($fileimagebis) || (filemtime($fileimagebis) < filemtime($file)))
|
&& (! file_exists($fileimagebis) || (filemtime($fileimagebis) < filemtime($file)))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user