Merge pull request #24055 from grandoc/new_branch_26_02_2023
fix : Warning: Undefined array key height in /home/httpd/vhosts/aflac…
This commit is contained in:
commit
b01e72e8d1
@ -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);
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||
$tmp = dol_getImageSize($realpath);
|
||||
$width = 0;
|
||||
$height = 0;
|
||||
if ($tmp['height']) {
|
||||
$width = (int) round($maxheight * $tmp['width'] / $tmp['height']); // I try to use maxheight
|
||||
if ($width > $maxwidth) { // Pb with maxheight, so i use maxwidth
|
||||
|
||||
Loading…
Reference in New Issue
Block a user