diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 32aefa2af14..c823ead80bf 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -2822,7 +2822,7 @@ class BookKeeping extends CommonObject $error++; } $objtmp = $this->db->fetch_object($result); - $bookkeeping->subledger_label = $objtmp->subledger_label; // latest subledger label used + $bookkeeping->subledger_label = $objtmp->subledger_label ?? null; // latest subledger label used } else { $bookkeeping->subledger_account = null; $bookkeeping->subledger_label = null;