Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix array merge exception on return from get_user_events_all #147

Conversation

catalyst-marcus-green
Copy link
Contributor

get_user_events_all returns a database record causing exception on array_merge. When functionname is get_user_events_all it returns an iterator rather than array which is typically a mysql or pgsql record type. This triggers the exception. This change populates the events array with instances of database record for iteration later on.
There may be a similar issue on
https://github.com/catalyst-marcus-green/moodle-local_assessfreq/blob/7a4959f62d9fec892d44dcd64d9f66f820c3d466/classes/frequency.php#L1299
But I will leave that to a later update.

Single button was throwing a deprecation error in the behat test and is only to do with ensuring the tests pass.

There are other unrelated behat failures that have not worked in quite a long time.

function was returning a database record causing exception on array_merge
Copy link

@catalyst-eu catalyst-eu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this changes looks good to me. As noted, there are a lot of failures from the CI checks, but these are existing fails, not introduced by this change.

@marxjohnson
Copy link
Contributor

That was me who did the review, I forgot I was logged in from a different account. Merging.

@marxjohnson marxjohnson merged commit 3ba6987 into catalyst:MOODLE_402_STABLE Nov 23, 2023
6 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants