Skip to content

Commit

Permalink
fix: prevent warning when extraprefix is null
Browse files Browse the repository at this point in the history
  • Loading branch information
Pol Torrent i Soler committed Sep 16, 2024
1 parent e91fdd5 commit 544484d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion step.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public function get_var($name, $subquesbool = true) {
}

private function get_step_var_internal($name, $subquesbool) {
if ($subquesbool && strlen($this->extraprefix) > 0) {
if ($subquesbool && isset($this->extraprefix) && strlen($this->extraprefix) > 0) {
// The prefix is needed when it is a subquestion of a cloze
// (multianswer) question type.
if (substr($name, 0, 2) === '!_') {
Expand Down

0 comments on commit 544484d

Please sign in to comment.