update code towards php8 compliance

This commit is contained in:
Philippe GRAND 2022-10-06 16:45:30 +02:00
parent d6e12d3589
commit cb1b4b82af
3 changed files with 3 additions and 3 deletions

View File

@ -253,7 +253,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$objphoto->fetch($object->lines[$i]->fk_product);
//var_dump($objphoto->ref);exit;
if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) {
if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) {
$pdir[0] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/";
$pdir[1] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/';
} else {

View File

@ -238,7 +238,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
$objphoto->fetch($object->lines[$i]->fk_product);
if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) {
if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) {
$pdir[0] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/";
$pdir[1] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/';
} else {

View File

@ -210,7 +210,7 @@ class pdf_espadon extends ModelePdfExpedition
$objphoto->fetch($object->lines[$i]->fk_product);
if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) {
if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) {
$pdir = get_exdir($object->lines[$i]->fk_product, 2, 0, 0, $objphoto, 'product').$object->lines[$i]->fk_product."/photos/";
$dir = $conf->product->dir_output.'/'.$pdir;
} else {