Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I receive a notice every time I try to create Multiple choice question. It is:
Notice: Undefined index: revision in quiz_question_node_form_submit() (line 142 of sites/all/modules/contrib/quiz/question_types/quiz_question/quiz_question.module).
It is this line of code:
if ($form_state['values']['revision']) {
As far as I understood there is some issues with quiz and revisions so I decided to go with the quick and obvious fix to put the $form_state['values']['revision']
into isset().
Patch in the comment below.
Regards,
Lachezar
Comment | File | Size | Author |
---|---|---|---|
#1 | quiz-undefined_index_revision-2541178-1.patch | 1.09 KB | lachezar.valchev |
|
Comments
Comment #1
lachezar.valchev CreditAttribution: lachezar.valchev at FFW commentedHi,
Patch is attached.
Regards,
Lachezar
Comment #2
djdevinThanks!
I changed isset() to !empty() because value of "revision" could possibly be set to 0.