From dce55591a81f0be16935853c3a3d7939b4f9364f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 10 Oct 2025 11:14:26 +0200 Subject: [PATCH] Bug 40978: Remove warnings from Budgets.t If no shipment_budget is set then undef is set as key of the hashref which generates a warning: Use of uninitialized value $row[0] in hash element at /usr/lib/x86_64-linux-gnu/perl5/5.40/DBI.pm line 2122. Later we only access the hashref by budget_id, so this change seems safe. Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Marcel de Rooy Signed-off-by: Lucas Gass (cherry picked from commit f073262263c847dee6152569997a06fc72fdc48b) Signed-off-by: Paul Derscheid (cherry picked from commit d4fd8fd299bafde383db16d0f63b1eb6946ede7f) Signed-off-by: Fridolin Somers --- C4/Budgets.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Budgets.pm b/C4/Budgets.pm index 26e4c49143..87c85c26f5 100644 --- a/C4/Budgets.pm +++ b/C4/Budgets.pm @@ -581,6 +581,7 @@ sub GetBudgetHierarchy { SELECT shipmentcost_budgetid as budget_id, SUM(shipmentcost) as shipmentcost FROM aqinvoices + WHERE shipmentcost_budgetid IS NOT NULL GROUP BY shipmentcost_budgetid |, 'budget_id'); my $hr_budget_spent_adjustment = $dbh->selectall_hashref(q|