Merge pull request #18028 from frederic34/patch-15

fix warnings
This commit is contained in:
Laurent Destailleur 2021-06-26 12:02:04 +02:00 committed by GitHub
commit 49688f327c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -294,8 +294,8 @@ if ($sortfield == 'stock' && $fk_warehouse > 0) {
}
$sql .= $db->order($sortfield, $sortorder);
$nbtotalofrecords = 0;
if ($date && $dateIsValid) { // We avoid a heavy sql if mandatory parameter date not yet defined
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
$result = $db->query($sql);
$nbtotalofrecords = $db->num_rows($result);
@ -618,7 +618,9 @@ if (empty($date) || ! $dateIsValid) {
print '</table>';
print '</div>';
$db->free($resql);
if (!empty($resql)) {
$db->free($resql);
}
print dol_get_fiche_end();