Skip to content

Conversation

@Hufschmidt
Copy link

@Hufschmidt Hufschmidt commented Nov 26, 2024

Ignoring the whitespace changes I added to put my commit in line with how the latest commits seem to be formatted, this only adds a fallback lookup to the translated value 'deleted' IFF trying to lookup a username for a comment, but the user does not exist (or doesn't have a login) anymore.

This fixes a PHP whoops exception that stops InteractiveVideo objects from being opened when there are comments from deleted accounts.

To test and reproduce

  • Create an InteractiveVideo object
  • Create and login with temporary account
  • Leave comment with temporary account
  • Logout and delete temporary account
  • Login with normal account and try to open InteractiveVideo object
    -> Throws exception about failed array key lookup (original) matching line 363

Potential Improvements

  • Currently this looks up the 'deleted' phrase from ILIAS common translation as a fallback when no account was found. Maybe this could be added to the plugins localization instead.

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.

2 participants