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>
(cherry picked from commit f073262263)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit d4fd8fd299)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2025-10-10 11:14:26 +02:00 committed by Fridolin Somers
parent 2861e8fdf8
commit dce55591a8
No known key found for this signature in database
GPG Key ID: 9A8E73E2A8B96537
1 changed files with 1 additions and 0 deletions

View File

@ -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|