From 6ecfb590775ec01c5a72f42e117bfcacb4cabb5e 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