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

Undefined variable: eventobj #356

Closed
garemoko opened this issue Dec 18, 2018 · 2 comments
Closed

Undefined variable: eventobj #356

garemoko opened this issue Dec 18, 2018 · 2 comments
Labels

Comments

@garemoko
Copy link
Contributor

Description
When logging an error relating to an invalid xapi statement (I'm investigating why the statement is invalid separately) the plugin calls an undefined variable 'eventobj'

Notice: Undefined variable: eventobj in /var/www/html/lms/html/admin/tool/log/store/xapi/src/loader/utils/load_batch.php on line 32

See

$logerror("Failed load for event id #" . $eventobj->id . ": " . $e->getMessage());

In addition to the notice, this results in the error not including the event id, making it harder to pin down where the error lies.

Version
Not sure what version our client is running, but I can see the issue in the code in the current master branch.

Steps to reproduce the bug
You would somehow need the plugin to send an invalid xapi statement to an LRS that rejects it, then observe the cron log.

Expected behaviour
There should be no error notice about the undefined variable and the error about the statement should include the event id.

Actual behaviour
There is an error notice about the undefined variable and the error about the statement does not include the event id.

Server information
Unknown

Client information
Unknown

Additional information
None

@garemoko
Copy link
Contributor Author

Closing because there's now a PR for this.

@HT2Bot
Copy link
Member

HT2Bot commented Jan 8, 2019

🎉 This issue has been resolved in version 4.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@HT2Bot HT2Bot added the released label Jan 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants