Merge pull request #16508 from FHenry/13.0

fix : avoid php warning
This commit is contained in:
Laurent Destailleur 2021-03-02 12:38:40 +01:00 committed by GitHub
commit 363e069a7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -1192,6 +1192,7 @@ class Facture extends CommonInvoice
if (($object->lines[$i]->info_bits & 0x02) == 0x02) // We do not clone line of discounts if (($object->lines[$i]->info_bits & 0x02) == 0x02) // We do not clone line of discounts
{ {
unset($object->lines[$i]); unset($object->lines[$i]);
continue;
} }
// Bloc to update dates of service (month by month only if previously filled and similare to start and end of month) // Bloc to update dates of service (month by month only if previously filled and similare to start and end of month)
@ -1218,7 +1219,7 @@ class Facture extends CommonInvoice
} }
} }
$object->lines[$i]->ref_ext = ''; // Do not clone ref_ext $object->lines[$i]->ref_ext = ''; // Do not clone ref_ext
} }
// Create clone // Create clone

View File

@ -51,7 +51,7 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir =
} }
// Check parameters // Check parameters
if (count($addfieldentry) > 0) if (is_array($addfieldentry) && count($addfieldentry) > 0)
{ {
if (empty($addfieldentry['name'])) if (empty($addfieldentry['name']))
{ {