From 550c57d53ed1760f31811efc51cf459c956d0671 Mon Sep 17 00:00:00 2001 From: BB2A Anthony Berton Date: Mon, 27 Jun 2022 08:45:38 +0200 Subject: [PATCH 1/8] FIX - php V8 composition card --- htdocs/product/composition/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index 69c872c51a4..8c4c407364f 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -680,7 +680,7 @@ if ($id > 0 || !empty($ref)) { print ''.$productstatic->getNomUrl(1, '', 24).''; $labeltoshow = $objp->label; - if ($conf->global->MAIN_MULTILANGS && $objp->labelm) { + if (!empty($conf->global->MAIN_MULTILANGS) && !empty($objp->labelm)) { $labeltoshow = $objp->labelm; } From ebe8e34249f10bcfba4d9a44a3c59058e19af58d Mon Sep 17 00:00:00 2001 From: BB2A Anthony Berton Date: Mon, 27 Jun 2022 08:49:27 +0200 Subject: [PATCH 2/8] total init --- htdocs/product/composition/card.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index 8c4c407364f..bc6a1c36628 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -380,6 +380,7 @@ if ($id > 0 || !empty($ref)) { print ''."\n"; $totalsell = 0; + $total = 0; if (count($prods_arbo)) { foreach ($prods_arbo as $value) { $productstatic->fetch($value['id']); @@ -418,7 +419,7 @@ if ($id > 0 || !empty($ref)) { $unitline = price2num(($fourn_unitprice * (1 - ($fourn_remise_percent / 100)) - $fourn_remise), 'MU'); $totalline = price2num($value['nb'] * ($fourn_unitprice * (1 - ($fourn_remise_percent / 100)) - $fourn_remise), 'MT'); - $total += $totalline; + $total += $totalline; print ''; print ($notdefined ? '' : ($value['nb'] > 1 ? $value['nb'].'x ' : '').''.price($unitline, '', '', 0, 0, -1, $conf->currency)).''; From f3b3e97d4949878c3557f2bf12a1fe6a01d8d488 Mon Sep 17 00:00:00 2001 From: BB2A Anthony Berton Date: Mon, 27 Jun 2022 08:51:12 +0200 Subject: [PATCH 3/8] Recursive call if there is childs to child --- htdocs/product/class/product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 5a7990cd0a7..f3ba9692d52 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -4633,7 +4633,7 @@ class Product extends CommonObject ); // Recursive call if there is childs to child - if (is_array($desc_pere['childs'])) { + if (isset($desc_pere['childs']) and is_array($desc_pere['childs'])) { //print 'YYY We go down for '.$desc_pere[3]." -> \n"; $this->fetch_prod_arbo($desc_pere['childs'], $compl_path.$desc_pere[3]." -> ", $desc_pere[1] * $multiply, $level + 1, $id, $ignore_stock_load); } From 0951fabd55f9bff57e8c1ae21830aca732ef7110 Mon Sep 17 00:00:00 2001 From: BB2A Anthony Berton Date: Mon, 27 Jun 2022 09:22:26 +0200 Subject: [PATCH 4/8] FIX - php V8 product batch --- htdocs/core/modules/product_batch/mod_lot_advanced.php | 9 ++++++--- htdocs/core/modules/product_batch/mod_sn_advanced.php | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/product_batch/mod_lot_advanced.php b/htdocs/core/modules/product_batch/mod_lot_advanced.php index d56178697f5..0865ebc9a66 100644 --- a/htdocs/core/modules/product_batch/mod_lot_advanced.php +++ b/htdocs/core/modules/product_batch/mod_lot_advanced.php @@ -65,6 +65,9 @@ class mod_lot_advanced extends ModeleNumRefBatch $form = new Form($db); + // We get cursor rule + $mask = isset($conf->global->LOT_ADVANCED_MASK) ? $conf->global->LOT_ADVANCED_MASK : ''; + $texte = $langs->trans('GenericNumRefModelDesc')."
\n"; $texte .= '
'; $texte .= ''; @@ -80,13 +83,13 @@ class mod_lot_advanced extends ModeleNumRefBatch // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte .= '  '; // Option to enable custom masks per product $texte .= ''; - if ($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS) { + if (!empty($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS)) { $texte .= ''.img_picto($langs->trans("Enabled"), 'on').''; } else { $texte .= ''.img_picto($langs->trans("Disabled"), 'off').''; @@ -139,7 +142,7 @@ class mod_lot_advanced extends ModeleNumRefBatch require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // We get cursor rule - $mask = $conf->global->LOT_ADVANCED_MASK; + $mask = isset($conf->global->LOT_ADVANCED_MASK) ? $conf->global->LOT_ADVANCED_MASK : ''; if (!$mask) { $this->error = 'NotConfigured'; diff --git a/htdocs/core/modules/product_batch/mod_sn_advanced.php b/htdocs/core/modules/product_batch/mod_sn_advanced.php index 6ee931d51a9..46f803cb20f 100644 --- a/htdocs/core/modules/product_batch/mod_sn_advanced.php +++ b/htdocs/core/modules/product_batch/mod_sn_advanced.php @@ -65,6 +65,9 @@ class mod_sn_advanced extends ModeleNumRefBatch $form = new Form($db); + // We get cursor rule + $mask = isset($conf->global->SN_ADVANCED_MASK) ? $conf->global->SN_ADVANCED_MASK : ''; + $texte = $langs->trans('GenericNumRefModelDesc')."
\n"; $texte .= ''; $texte .= ''; @@ -80,13 +83,13 @@ class mod_sn_advanced extends ModeleNumRefBatch // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte .= '  '; // Option to enable custom masks per product $texte .= ''; - if ($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS) { + if (!empty($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS)) { $texte .= ''.img_picto($langs->trans("Enabled"), 'on').''; } else { $texte .= ''.img_picto($langs->trans("Disabled"), 'off').''; @@ -139,7 +142,7 @@ class mod_sn_advanced extends ModeleNumRefBatch require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // We get cursor rule - $mask = $conf->global->SN_ADVANCED_MASK; + $mask = isset($conf->global->SN_ADVANCED_MASK) ? $conf->global->SN_ADVANCED_MASK : ''; if (!$mask) { $this->error = 'NotConfigured'; From 4e46c3f7a22930f381d1d9b207ced9807f765fee Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 27 Jun 2022 10:17:14 +0200 Subject: [PATCH 5/8] Clean code --- htdocs/core/class/commonobject.class.php | 2 -- htdocs/core/lib/functions.lib.php | 28 ++++++++++++++++++++++++ htdocs/ticket/class/ticket.class.php | 3 +-- htdocs/website/index.php | 1 - 4 files changed, 29 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 4a95bb7d345..1d3a091cab1 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -8402,8 +8402,6 @@ abstract class CommonObject $photo = ''; $file = $val['name']; - //if (! utf8_check($file)) $file=utf8_encode($file); // To be sure file is stored in UTF8 in memory - //if (dol_is_file($dir.$file) && image_format_supported($file) >= 0) if (image_format_supported($file) >= 0) { $nbphoto++; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 13ccde98bf2..7e95bf0e95f 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -42,6 +42,34 @@ include_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php'; + +if (!function_exists('utf8_encode')) { + /** + * Implement utf8_encode for PHP that does not support it. + * + * @param mixed $elements PHP Object to json encode + * @return string Json encoded string + */ + function utf8_encode($elements) + { + return mb_convert_encoding($elements, 'UTF-8', 'ISO-8859-1'); + } +} + +if (!function_exists('utf8_decode')) { + /** + * Implement utf8_decode for PHP that does not support it. + * + * @param mixed $elements PHP Object to json encode + * @return string Json encoded string + */ + function utf8_decode($elements) + { + return mb_convert_encoding($elements, 'ISO-8859-1', 'UTF-8'); + } +} + + /** * Return dolibarr global constant string value * @param string $key key to return value, return '' if not set diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 67fb1772ac4..5fae77938e8 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -2319,9 +2319,8 @@ class Ticket extends CommonObject if (is_resource($handle)) { while (($file = readdir($handle)) !== false) { if (!utf8_check($file)) { - $file = utf8_encode($file); + $file = utf8_encode($file); // To be sure data is stored in UTF8 in memory } - // To be sure data is stored in UTF8 in memory if (dol_is_file($dir.$file)) { return true; } diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 6e15359056a..2a5f4cc59fe 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -885,7 +885,6 @@ if ($action == 'addcontainer' && $usercanedit) { } else { // Clean some comment //$tmpgeturl['content'] = dol_string_is_good_iso($tmpgeturl['content'], 1); - //$tmpgeturl['content'] = utf8_encode(utf8_decode($tmpgeturl['content'])); //$tmpgeturl['content'] = mb_convert_encoding($tmpgeturl['content'], 'UTF-8', 'UTF-8'); //$tmpgeturl['content'] = remove_bs($tmpgeturl['content']); //$tmpgeturl['content'] = str_replace('$screen-md-max', 'auto', $tmpgeturl['content']); From f09638972cf3aa63873ae8fd4ab3305828f6a331 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 27 Jun 2022 10:45:04 +0200 Subject: [PATCH 6/8] Debug v16 --- htdocs/compta/facture/class/facture.class.php | 12 +++++-- htdocs/compta/facture/info.php | 4 +-- htdocs/compta/index.php | 32 ++++++++--------- htdocs/core/class/commonobject.class.php | 35 +++++++++++++++---- 4 files changed, 56 insertions(+), 27 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 5993bd39a7c..59564612cc2 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -124,6 +124,12 @@ class Facture extends CommonInvoice */ public $fk_user_valid; + /** + * @var int ID + */ + public $fk_user_modif; + + public $date; // Date invoice public $datem; @@ -1935,7 +1941,7 @@ class Facture extends CommonInvoice $sql .= ', f.datec as datec'; $sql .= ', f.date_valid as datev'; $sql .= ', f.tms as datem'; - $sql .= ', f.note_private, f.note_public, f.fk_statut, f.paye, f.close_code, f.close_note, f.fk_user_author, f.fk_user_valid, f.model_pdf, f.last_main_doc'; + $sql .= ', f.note_private, f.note_public, f.fk_statut, f.paye, f.close_code, f.close_note, f.fk_user_author, f.fk_user_valid, f.fk_user_modif, f.model_pdf, f.last_main_doc'; $sql .= ', f.fk_facture_source, f.fk_fac_rec_source'; $sql .= ', f.fk_mode_reglement, f.fk_cond_reglement, f.fk_projet as fk_project, f.extraparams'; $sql .= ', f.situation_cycle_ref, f.situation_counter, f.situation_final'; @@ -2023,8 +2029,10 @@ class Facture extends CommonInvoice $this->note_public = $obj->note_public; $this->user_author = $obj->fk_user_author; // deprecated $this->user_valid = $obj->fk_user_valid; // deprecated - $this->fk_user_author = $obj->fk_user_author; + $this->user_modification = $obj->fk_user_modif; // deprecated + $this->fk_user_author = $obj->fk_user_author; $this->fk_user_valid = $obj->fk_user_valid; + $this->fk_user_modif = $obj->fk_user_modif; $this->model_pdf = $obj->model_pdf; $this->modelpdf = $obj->model_pdf; // deprecated $this->last_main_doc = $obj->last_main_doc; diff --git a/htdocs/compta/facture/info.php b/htdocs/compta/facture/info.php index 8b198e5f991..4521c7e5096 100644 --- a/htdocs/compta/facture/info.php +++ b/htdocs/compta/facture/info.php @@ -51,12 +51,12 @@ if ($id > 0 || !empty($ref)) { } // Security check -$fieldid = (!empty($ref) ? 'ref' : 'rowid'); if ($user->socid) { $socid = $user->socid; } $isdraft = (($object->statut == Facture::STATUS_DRAFT) ? 1 : 0); -$result = restrictedArea($user, 'facture', $object->id, '', '', 'fk_soc', $fieldid, $isdraft); + +$result = restrictedArea($user, 'facture', $object->id, '', '', 'fk_soc', 'rowid', $isdraft); /* diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 93b73d8ddd4..e7cb0b1d4b5 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -1,8 +1,8 @@ - * Copyright (C) 2004-2013 Laurent Destailleur + * Copyright (C) 2004-2022 Laurent Destailleur * Copyright (C) 2005-2015 Regis Houssin - * Copyright (C) 2015-2020 Juanjo Menent + * Copyright (C) 2015-2020 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2016 Marcos García @@ -237,7 +237,7 @@ if (isModEnabled('facture') && !empty($user->rights->facture->lire)) { } print ''.price($obj->total_ttc).''; - print ''.dol_print_date($db->jdate($obj->tms), 'day').''; + print 'jdate($obj->tms), 'dayhour', 'tzuserrel')).'">'.dol_print_date($db->jdate($obj->tms), 'day', 'tzuserrel').''; print ''.$tmpinvoice->getLibStatut(3, $obj->am).''; @@ -367,7 +367,7 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU print ''.price($obj->total_ht).''; } print ''.price($obj->total_ttc).''; - print ''.dol_print_date($db->jdate($obj->tms), 'day').''; + print 'jdate($obj->tms), 'dayhour', 'tzuserrel')).'">'.dol_print_date($db->jdate($obj->tms), 'day', 'tzuserrel').''; $alreadypaid = $facstatic->getSommePaiement(); print ''.$facstatic->getLibStatut(3, $alreadypaid).''; print ''; @@ -437,7 +437,7 @@ if (!empty($conf->don->enabled) && !empty($user->rights->don->lire)) { $total_ttc = $totalam = $total_ht = 0; while ($i < $num && $i < $max) { - $objp = $db->fetch_object($result); + $obj = $db->fetch_object($result); if ($i >= $max) { $othernb += 1; @@ -447,24 +447,24 @@ if (!empty($conf->don->enabled) && !empty($user->rights->don->lire)) { continue; } - $donationstatic->id = $objp->rowid; - $donationstatic->ref = $objp->rowid; - $donationstatic->lastname = $objp->lastname; - $donationstatic->firstname = $objp->firstname; - $donationstatic->date = $objp->date; - $donationstatic->statut = $objp->status; - $donationstatic->status = $objp->status; + $donationstatic->id = $obj->rowid; + $donationstatic->ref = $obj->rowid; + $donationstatic->lastname = $obj->lastname; + $donationstatic->firstname = $obj->firstname; + $donationstatic->date = $obj->date; + $donationstatic->statut = $obj->status; + $donationstatic->status = $obj->status; $label = $donationstatic->getFullName($langs); - if ($objp->societe) { - $label .= ($label ? ' - ' : '').$objp->societe; + if ($obj->societe) { + $label .= ($label ? ' - ' : '').$obj->societe; } print ''; print ''.$donationstatic->getNomUrl(1).''; print ''.$label.''; - print ''.price($objp->amount).''; - print ''.dol_print_date($db->jdate($objp->dm), 'day').''; + print ''.price($obj->amount).''; + print 'jdate($obj->dm), 'dayhour', 'tzuserrel')).'">'.dol_print_date($db->jdate($obj->dm), 'day', 'tzuserrel').''; print ''.$donationstatic->getLibStatut(3).''; print ''; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 1d3a091cab1..7f2ffb3ddad 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -169,13 +169,13 @@ abstract class CommonObject public $canvas; /** - * @var Project The related project + * @var Project The related project object * @see fetch_projet() */ public $project; /** - * @var int The related project ID + * @var int The related project ID * @see setProject(), project */ public $fk_project; @@ -188,24 +188,24 @@ abstract class CommonObject /** * @deprecated - * @see fk_project + * @see $fk_project */ public $fk_projet; /** - * @var Contact a related contact + * @var Contact A related contact object * @see fetch_contact() */ public $contact; /** - * @var int The related contact ID + * @var int The related contact ID * @see fetch_contact() */ public $contact_id; /** - * @var Societe A related thirdparty + * @var Societe A related thirdparty object * @see fetch_thirdparty() */ public $thirdparty; @@ -254,7 +254,7 @@ abstract class CommonObject public $newref; /** - * @var int The object's status + * @var int The object's status. Prefer use of status. * @see setStatut() */ public $statut; @@ -265,6 +265,7 @@ abstract class CommonObject */ public $status; + /** * @var string * @see getFullAddress() @@ -319,6 +320,7 @@ abstract class CommonObject */ public $region; + /** * @var int * @see fetch_barcode() @@ -518,6 +520,24 @@ abstract class CommonObject */ public $date_modification; // Date last change (tms field) + /** + * @var string User id of author + * @deprecated + */ + public $user_author; + /** + * @var string User id of validation + * @deprecated + */ + public $user_valid; + + /** + * @var string User id of last modifier + * @deprecated + */ + public $user_modification; + + public $next_prev_filter; /** @@ -535,6 +555,7 @@ abstract class CommonObject */ public $alreadypaid; + /** * @var array List of child tables. To test if we can delete object. */ From 7e94eaac0774cbea9524926403ac2b335ca23e35 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 27 Jun 2022 10:53:03 +0200 Subject: [PATCH 7/8] Debug v16 --- htdocs/core/lib/payments.lib.php | 2 +- htdocs/core/tpl/onlinepaymentlinks.tpl.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/lib/payments.lib.php b/htdocs/core/lib/payments.lib.php index 2911564adef..fe89dcea00f 100644 --- a/htdocs/core/lib/payments.lib.php +++ b/htdocs/core/lib/payments.lib.php @@ -182,7 +182,7 @@ function showOnlinePaymentUrl($type, $ref) // Load translation files required by the page $langs->loadLangs(array('payment', 'stripe')); - $servicename = $langs->transnoentitiesnoconv('Online'); + $servicename = ''; // Link is a generic link for all payments services (paypal, stripe, ...) $out = img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePayment", $servicename).'
'; $url = getOnlinePaymentUrl(0, $type, $ref); diff --git a/htdocs/core/tpl/onlinepaymentlinks.tpl.php b/htdocs/core/tpl/onlinepaymentlinks.tpl.php index e40f360051e..001ada1de0f 100644 --- a/htdocs/core/tpl/onlinepaymentlinks.tpl.php +++ b/htdocs/core/tpl/onlinepaymentlinks.tpl.php @@ -54,7 +54,7 @@ if (!empty($conf->commande->enabled)) { } if (isModEnabled('facture')) { print '
'; - print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnInvoice", $servicename).':
'; + print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnInvoice", $servicename).':
'; print ''.getOnlinePaymentUrl(1, 'invoice')."
\n"; if (!empty($conf->global->PAYMENT_SECURITY_TOKEN) && !empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { $langs->load("bills"); @@ -76,7 +76,7 @@ if (isModEnabled('facture')) { } if (!empty($conf->contrat->enabled)) { print '
'; - print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnContractLine", $servicename).':
'; + print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnContractLine", $servicename).':
'; print ''.getOnlinePaymentUrl(1, 'contractline')."
\n"; if (!empty($conf->global->PAYMENT_SECURITY_TOKEN) && !empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { $langs->load("contracts"); @@ -98,7 +98,7 @@ if (!empty($conf->contrat->enabled)) { } if (!empty($conf->adherent->enabled)) { print '
'; - print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnMemberSubscription", $servicename).':
'; + print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnMemberSubscription", $servicename).':
'; print ''.getOnlinePaymentUrl(1, 'membersubscription')."
\n"; if (!empty($conf->global->PAYMENT_SECURITY_TOKEN) && !empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { $langs->load("members"); @@ -120,7 +120,7 @@ if (!empty($conf->adherent->enabled)) { } if (!empty($conf->don->enabled)) { print '
'; - print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnDonation", $servicename).':
'; + print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnDonation", $servicename).':
'; print ''.getOnlinePaymentUrl(1, 'donation')."
\n"; if (!empty($conf->global->PAYMENT_SECURITY_TOKEN) && !empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { $langs->load("members"); From 834d12963429c3a035231a68f0a127c2f82c8006 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 27 Jun 2022 11:11:43 +0200 Subject: [PATCH 8/8] Update product.class.php --- htdocs/product/class/product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index f3ba9692d52..01d401e384d 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -4633,7 +4633,7 @@ class Product extends CommonObject ); // Recursive call if there is childs to child - if (isset($desc_pere['childs']) and is_array($desc_pere['childs'])) { + if (isset($desc_pere['childs']) && is_array($desc_pere['childs'])) { //print 'YYY We go down for '.$desc_pere[3]." -> \n"; $this->fetch_prod_arbo($desc_pere['childs'], $compl_path.$desc_pere[3]." -> ", $desc_pere[1] * $multiply, $level + 1, $id, $ignore_stock_load); }