Closed (cannot reproduce)
Project:
Quiz
Version:
7.x-4.x-dev
Component:
Code - Quiz core
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Apr 2012 at 12:31 UTC
Updated:
22 Apr 2012 at 22:28 UTC
I got this notice in watch when a privileged user attempting to create a quiz
Notice: Trying to get property of non-object in quiz_question_node_access() (line 109 of /home/learnin/public_html/sites/all/modules/contrib/quiz/question_types/quiz_question/quiz_question.module).
check the comments in the following code
case 'create':
// user is privileged to create quizes, so he passes this condition
if (!user_access('create quiz content', $account)) {
return NODE_ACCESS_DENY;
}
// NO BREAK
case 'update':
// BUG .. in creation op but code is checking for update access
// $node is only plain text of type but being used as $node object.
if (user_access('edit any quiz content', $account) || (user_access('edit own quiz content', $account) && ($account->uid == $node->uid))) {
return NODE_ACCESS_ALLOW;
}
| Comment | File | Size | Author |
|---|---|---|---|
| quiz.patch | 1.02 KB | amagdy |
Comments
Comment #1
falcon commented