- Status changed to Closed: outdated
2 months ago 6:32pm 2 November 2024
We had constructed a View listing users, that is used on the admin side of things for a website.
We started to get a lot of notices in the log,
Notice: Trying to get property of non-object in quiz_access_results() (line 186 of .../sites/all/modules/quiz/quiz.module).
After digging through the code, making a change to the quiz_result_access() function in quiz.module fixed the issue
Before:
function quiz_result_access($op, $quiz_result) {
$quiz = node_load($quiz_result->nid);
return quiz_access_results($quiz, $quiz_result);
}
After:
function quiz_result_access($op, $quiz_result) {
if (is_object($quiz_result)) {
$quiz = node_load($quiz_result->nid);
return quiz_access_results($quiz, $quiz_result);
}
else {
return FALSE;
}
}
Postponed: needs info
5.3
Code - Quiz core
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.