My Achievements - opigno_class_app.module line 281

SaZink
Forums
Hello, I just finished installing Opigno (I'm a newbie), & I still have one Warning I have not been able to fix: When opening "My Achievements" I get the following warning (nothing else is displayed): Warning: Invalid argument supplied for foreach() in opigno_class_app_user_results() (line 281 of (mywebsite)/profiles/opigno_lms/modules/opigno/opigno_class_app/opigno_class_app.module). I was only able to sind one fix for another issue on the opigno_class_app.module which was for line 305 though: ( the link for that issue: https://www.drupal.org/node/2656888/revisions/9317272/view) I did do the changes suggested there (in opigno_class_app.module and in opigno_quiz_app.module), hoping it would solve my issue, but it didn't help... thanks in advance!
SaZink

My Achievements - opigno_class_app.module line 281 - SOLVED!

In case anyone else runs into the same problem, here's a patch to solve it: https://www.drupal.org/node/2569471 The code in go.module needs a change: function og_get_groups_by_user($account = NULL, $group_type = NULL) { if (empty($account)) { global $user; $account = $user; } if (!og_get_group_audience_fields()) { // User entity doesn't have group audience fields. return; } $gids = array(); // Get all active OG membership that belong to the user. $wrapper = entity_metadata_wrapper('user', $account->uid); $og_memberships = $wrapper->{'og_membership__' . OG_STATE_ACTIVE}->value(); if (!$og_memberships) { //return; //************* //instead of a plain return, we need to return $gids; this is what was causing the invalid argument warning since it was not returning anything... return $gids; //************* }