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;
      }   
CommentFileSizeAuthor
quiz.patch1.02 KBamagdy

Comments

falcon’s picture

Status: Needs review » Closed (cannot reproduce)