Conversation
refactor billing to eliminate log errors and increase performance.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e41f94bb3e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| </div> | ||
|
|
||
| <?php | ||
| mysqli_close($conn); |
There was a problem hiding this comment.
Remove duplicate mysqli_close before footer include
public/billing.php closes $conn and then immediately includes footer.php, which also calls mysqli_close($conn) when $conn is a mysqli instance. On PHP 8 (the repo targets php:8.4), that second close raises a fatal mysqli object is already closed, so this page can crash after rendering. Keep connection cleanup in one place (footer or page), but not both.
Useful? React with 👍 / 👎.
| if ($selectedLibrary !== '') { | ||
| $librarySql .= ' WHERE university = ?'; | ||
| $params[] = $selectedLibrary; |
There was a problem hiding this comment.
Load full library list even when a filter is active
The dropdown options query is constrained with WHERE university = ? whenever $selectedLibrary is non-empty, so once a user filters by one library they can no longer directly switch to a different library in the same form submission (only the current library plus “All Libraries” remains). This regresses the filter workflow; the options list should remain the full library set while only the report query applies the selected-library filter.
Useful? React with 👍 / 👎.
refactor billing to eliminate log errors and increase performance.