Merge pull request #22481 from ptibogxiv/patch-50

Fix better fix for php 8
This commit is contained in:
Laurent Destailleur 2022-10-04 16:53:10 +02:00 committed by GitHub
commit eeb2e3fc03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4812,7 +4812,7 @@ class Product extends CommonObject
$sql .= " AND pa.fk_product_fils <> ".((int) $id); // This should not happens, it is to avoid infinite loop if it happens
$sql.= " ORDER BY pa.rang";
dol_syslog(get_class($this).'::getChildsArbo id='.$id.' level='.$level. ' parents='.implode(',', $parents), LOG_DEBUG);
dol_syslog(get_class($this).'::getChildsArbo id='.$id.' level='.$level. ' parents='.(is_array($parents)?implode(',', $parents):$parents), LOG_DEBUG);
if ($level == 1) {
$alreadyfound = array($id=>1); // We init array of found object to start of tree, so if we found it later (should not happened), we stop immediatly