From 7cc97b2b09a11210d3e64906402ebe1418f75fc6 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 30 Dec 2022 12:47:52 +0100 Subject: [PATCH] update code toward php8 compliance --- htdocs/core/modules/modService.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/modService.class.php b/htdocs/core/modules/modService.class.php index 868303c231b..a316c746acb 100644 --- a/htdocs/core/modules/modService.class.php +++ b/htdocs/core/modules/modService.class.php @@ -198,7 +198,7 @@ class modService extends DolibarrModules if (getDolGlobalInt('MAIN_MULTILANGS')) { $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('l.lang'=>'Language', 'l.label'=>'TranslatedLabel', 'l.description'=>'TranslatedDescription', 'l.note'=>'TranslatedNote')); } - if (!empty($conf->global->PRODUCT_USE_UNITS)) { + if (getDolGlobalInt('PRODUCT_USE_UNITS')) { $this->export_fields_array[$r]['p.fk_unit'] = 'Unit'; } $this->export_TypeFields_array[$r] = array( @@ -587,7 +587,7 @@ class modService extends DolibarrModules if (isModEnabled('barcode')) { $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('p.barcode'=>'BarCode')); } - if (!empty($conf->global->PRODUCT_USE_UNITS)) { + if (getDolGlobalInt('PRODUCT_USE_UNITS')) { $this->import_fields_array[$r]['p.fk_unit'] = 'Unit'; } // Add extra fields @@ -678,7 +678,7 @@ class modService extends DolibarrModules if (isModEnabled('barcode')) { $import_sample = array_merge($import_sample, array('p.barcode'=>'')); } - if (!empty($conf->global->PRODUCT_USE_UNITS)) { + if (getDolGlobalInt('PRODUCT_USE_UNITS')) { $import_sample = array_merge( $import_sample, array(