From d4ba29cac0b40f0ba96036108c1ca33813d7a270 Mon Sep 17 00:00:00 2001 From: Ilya Tregubov Date: Wed, 9 Jun 2021 06:06:10 +0200 Subject: [PATCH] MDL-70750 mod_survey: Fix warning for undefined offset. --- lib/graphlib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/graphlib.php b/lib/graphlib.php index 64db34af792..11aad5f2070 100644 --- a/lib/graphlib.php +++ b/lib/graphlib.php @@ -307,7 +307,7 @@ class graph { //print "$thisX, $thisY
"; if (($bar!='none') && (string)$thisY != 'none') { - if ($relatedset = $this->offset_relation[$set]) { // Moodle + if (isset($this->offset_relation[$set]) && $relatedset = $this->offset_relation[$set]) { $yoffset = $this->calculated['y_plot'][$relatedset][$index]; // Moodle } else { // Moodle $yoffset = 0; // Moodle