Merge pull request #32675 from alexandre-janniaux/accounting-num_rows_leftovers

FIX: accounting: fix num_rows without call from $db
This commit is contained in:
Laurent Destailleur 2025-01-16 14:36:27 +01:00 committed by GitHub
commit 0bf729f143
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -295,7 +295,7 @@ function getDefaultDatesForTransfer()
$sql .= " WHERE date_start < '".$db->idate(dol_now())."' AND date_end > '".$db->idate(dol_now())."'";
$sql .= $db->plimit(1);
$res = $db->query($sql);
if ($res->num_rows > 0) {
if ($db->num_rows($res) > 0) {
$obj = $db->fetch_object($res);
$date_start = $db->jdate($obj->date_start);