From abc7f824d7ccb41f3f9fdfee3f94c0f0888e36ee Mon Sep 17 00:00:00 2001 From: ThomasNgr-OpenDSI Date: Tue, 15 Jul 2025 06:14:53 +0200 Subject: [PATCH] FIX accountancy closure: if subledger_label is not found, PHP8.2 throws an error. (#34736) --- htdocs/accountancy/class/bookkeeping.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;