I get this notice at the question results page after finishing a quiz:
Notice: Undefined index: cid in comment_publish_action() (line 2542 of /home5/shuttew6/public_html/modules/comment/comment.module).

Also when i go to the "track" or "my results" page i get this notice:
Notice: Undefined variable: pre_score in theme_quiz_get_user_results() (line 326 of /home5/shuttew6/public_html/sites/all/modules/date-7.x-2.5/quiz-7.x-4.0-alpha9/quiz/quiz.pages.inc).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RuneB’s picture

Component: Code - other » Code - Quiz core
gpsrattan’s picture

After Completing the quiz, i'm getting the following notice. What should be done to eliminate this?

Notice: Undefined index: cid in comment_publish_action() (line 2554 of /xxx/xxx/xxxxx/onlygoodies.com/modules/comment/comment.module).

ultimike’s picture

Issue summary: View changes
FileSize
399 bytes

Attached is a patch against the 7.x-4.x branch that should take care of "Notice: Undefined variable: pre_score in theme_quiz_get_user_results".

Thanks,
-mike

ultimike’s picture

FileSize
1.02 KB

Here's an updated patch with an additional fix preventing undefined variable notices.

Thanks,
-mike

ultimike’s picture

Status: Active » Needs review
falcon’s picture

Status: Needs review » Fixed

Great, thanks!

  • falcon committed 7ab08b6 on 7.x-4.x authored by ultimike
    Issue #1709904 by ultimike: Undefined index notice after finishing quiz
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.