fix : Warning: Undefined array key height in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/core/lib/pdf.lib.php on line 2513
This commit is contained in:
parent
cbb6ca071a
commit
014aec72c2
@ -2510,6 +2510,8 @@ function pdf_getSizeForImage($realpath)
|
|||||||
$maxheight = (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_HEIGHT) ? 32 : $conf->global->MAIN_DOCUMENTS_WITH_PICTURE_HEIGHT);
|
$maxheight = (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_HEIGHT) ? 32 : $conf->global->MAIN_DOCUMENTS_WITH_PICTURE_HEIGHT);
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||||
$tmp = dol_getImageSize($realpath);
|
$tmp = dol_getImageSize($realpath);
|
||||||
|
$width = 0;
|
||||||
|
$height = 0;
|
||||||
if ($tmp['height']) {
|
if ($tmp['height']) {
|
||||||
$width = (int) round($maxheight * $tmp['width'] / $tmp['height']); // I try to use maxheight
|
$width = (int) round($maxheight * $tmp['width'] / $tmp['height']); // I try to use maxheight
|
||||||
if ($width > $maxwidth) { // Pb with maxheight, so i use maxwidth
|
if ($width > $maxwidth) { // Pb with maxheight, so i use maxwidth
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user