[MT8748] TEST PLAN: 1) Create a new budget/fund which will be deleted later. 2) Add a suggestion attached to the new fund. 3) Delete the fund. 4) When trying to access the suggestion management pages, koha crashes and display this error message: Can't use an undefined value as a HASH reference at /home/asaurat/workspace/versions/community/suggestion/suggestion.pl line 208.
Created attachment 8797 [details] [review] proposed patch #1
Sent a patch preventing the undefined hash problem. But maybe we should also do that, when a budget is deleted, all linked "budgetid" in suggestions are set to NULL ?
(In reply to comment #2) > But maybe we should also do that, when a budget is deleted, all linked > "budgetid" in suggestions are set to NULL ? This sounds good to me.
Created attachment 9033 [details] [review] Bug 7871: prevents crash when suggestion linked to erased budget Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Breaks out a complex one-liner with lots of assumptions of existence into multiple lines with the proper conditional checks. Marking Passed QA.
There have been no further reports of problems so I am marking this bug resolved.