Warning: Invalid argument supplied for foreach()

Warning: Invalid argument supplied for foreach()

by thierry reygnier -
Number of replies: 3
Hello,

Sometimes i get the message like in the subject of this message.

It's appear when i modifiy a cloze format question in a quiz but it's still working.

I do not understand...
Average of ratings: -
In reply to thierry reygnier

Re: Warning: Invalid argument supplied for foreach()

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I'm guessing from your previous posts that you are using Moodle 1.2 Beta.  Can you please provide the full error message (there should be a line number and a file).
In reply to Martin Dougiamas

Re: Warning: Invalid argument supplied for foreach()

by thierry reygnier -
Hello,

I'm using 1.2 beta...
The folowing sentence in error message is :

/var/www/www.e-stj.edres74.ac-grenoble.fr/htdocs/moodle/mod/quiz/lib.php on line 366

Thanks you
In reply to thierry reygnier

Re: Warning: Invalid argument supplied for foreach()

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Well that error won't occur in Moodle 1.2 now.  The root of the problem, though, seems to be in the formatting for your multianswer (cloze) question.