Error saving a question

Error saving a question

by Marina Tych -
Number of replies: 3

Hello!

When I'm trying to edit a question or save it as 'new question' I started to get the following error message:

"Exception - count(): Argument #1 ($value) must be of type Countable|array, null given"

-- then I press "Continue" and another error message follows: --
"A required parameter (id) was missing"

This issue concerns ALL questionnaires created more than few days ago. I only do not have this error with a questionnaire I've been working with yesterday.

All questionnaires could be edited without troubles just recently...

Moodle Version: 4.1.1
Questionnaire plugin version: 3.11.1
PHP 8.0

Any idea what has happened and how to solve it? 

Thanks!

Average of ratings: -
In reply to Marina Tych

Re: Error saving a question

by Marina Tych -

UPD: Here are screenshots with debug info


Attachment Screenshot 2023-03-04 at 14.10.07.png
Attachment Screenshot 2023-03-04 at 14.10.15.png
In reply to Marina Tych

Re: Error saving a question

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
Update to the lastest release of questionnaire, in your case, 4.0.0. It has fixes for PHP8.
Average of ratings: Useful (1)