Skip to content

[statistics-imaging stats] Fix: Imaging Statistics fatal type error in stats_mri#10364

Merged
driusan merged 1 commit intoaces:mainfrom
arnav-makkar:fix/10272-imaging-stats
Feb 23, 2026
Merged

[statistics-imaging stats] Fix: Imaging Statistics fatal type error in stats_mri#10364
driusan merged 1 commit intoaces:mainfrom
arnav-makkar:fix/10272-imaging-stats

Conversation

@arnav-makkar
Copy link
Contributor

Brief summary of changes

This PR fixes the error on Reports -> Statistics -> Imaging Statistics.

Stats_MRI::renderStatsTable() requires argument $data to be an array, but a LORIS\Database\Query object was being passed from setup().

Updated modules/statistics/php/stats_mri.class.inc to convert the pselect() result to an array using iterator_to_array(...) before passing it to renderStatsTable().

Testing

Before:
Screenshot 2026-02-13 at 13 13 41

After:
Screenshot 2026-02-13 at 13 03 22

Link(s) to related issue(s)

@github-actions github-actions bot added Language: PHP PR or issue that update PHP code Module: statistics PR or issue related to statistics module labels Feb 13, 2026
@kongtiaowang kongtiaowang added the Passed manual tests PR has been successfully tested by at least one peer label Feb 17, 2026
@driusan driusan merged commit 3d02ebd into aces:main Feb 23, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Language: PHP PR or issue that update PHP code Module: statistics PR or issue related to statistics module Passed manual tests PR has been successfully tested by at least one peer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[statistics - imaging statistics] 500 when acceding this tab

3 participants