When trying to export the CodeRunner question with broken template (missing prototypes) and when no customisation is provided, we see the PHP errors thrown.
The below question when exported, we see the errors. Could you please have a look. Kindly let me know if any other details are required.
CodeRunner version: Latest from MOODLE_3X_STABLE
Not sure if the version matters.
Errors seen:Warning: foreach() argument must be of type array|object, null given in /var/www/html/moodle/question/type/coderunner/questiontype.php on line 855
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/moodle/question/type/coderunner/questiontype.php:855) in /var/www/html/moodle/lib/filelib.php on line 2542