Skip to content
Snippets Groups Projects
Commit aa842040 authored by Anupama Sarjoshi's avatar Anupama Sarjoshi
Browse files

Fix PHP8.1 deprecation error in todo block - question.php

parent 60ecd937
No related branches found
No related tags found
No related merge requests found
......@@ -1600,7 +1600,7 @@ class qtype_stack_question extends question_graded_automatically_with_countback
}
$pat = '/\[\[todo/';
foreach ($tocheck as $field => $text) {
if (preg_match($pat, $text)) {
if (preg_match($pat, $text ?? '')) {
$warnings[] = stack_string_error('todowarning', array('field' => $field));
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment