Create a Check boxes question with one !other possible answer.
Take questionnaire and, on that question page, tick the !other choice but leave the box/field empty. then click Next page or Submit.
You get the expected questionnaire warning messages:
There is something wrong with question: #1.
If you tick this choice you must enter some text in the text box!
But - if DEBUG mode is ON - you also get a PHP Notice:
Notice: Undefined variable: resid in moodle\mod\questionnaire\questiontypes\questiontypes.class.php on line 361.
Very easy fix : in questiontypes.class.php at the beginning of function insert_resp_multiple($rid), line 320 add: $resid = '';