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 <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2025-10-10 11:14:26 +02:00 committed by Lucas Gass
parent 17a07dcc2a
commit f073262263
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 1 additions and 0 deletions

View File

@ -755,6 +755,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'
);