Conversation
…Report sort loops When refactoring from while...extract() to foreach, the fund and family sort loops were missing variable extractions from the $aRow array, causing undefined variable errors and blank screens when generating reports with these sort options. - Sort by Fund loop: Add extraction of fam_Address1, plg_depID, plg_amount, plg_method, plg_comment, plg_CheckNo, dep_Date with null-safe checks - Sort by Family loop: Add complete extraction of all 11 required variables (fun_ID, fun_Name, fam_ID, fam_Name, fam_Address1, plg_depID, plg_amount, plg_method, plg_comment, plg_CheckNo, dep_Date) This fixes blank screen issues when users select these sort options or PDF/CSV export formats for Advanced Deposit Reports.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes undefined variable errors in the Advanced Deposit Report by adding manual variable extractions that were missing after a previous refactoring from while...extract() to foreach. The PR correctly addresses the "Sort by Fund" section with null-safe checks but inconsistently implements the "Sort by Family" section with direct array access that could still cause warnings.
Key Changes
- Added 7 variable extractions with null-safe
isset()checks to the "Sort by Fund" loop (lines 467-473) - Added 11 variable extractions with direct array access to the "Sort by Family" loop (lines 631-641)
- Both sections now extract all required variables from the
$aRowarray instead of relying on the deprecatedextract()function
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When refactoring from while...extract() to foreach, the fund and family sort loops were missing variable extractions from the $aRow array, causing undefined variable errors and blank screens when generating reports with these sort options.
This fixes blank screen issues when users select these sort options or PDF/CSV export formats for Advanced Deposit Reports.
Fix #7651
What Changed
Fixes #
Type
Testing
Screenshots
Security Check
Code Quality
Pre-Merge