Browse Source

Fix #479 PHP 7.4 fix for array_key_exists()

nwp90-nwp90-allsessionsreport
Dan Marsden 5 years ago
parent
commit
916bdf2924
  1. 2
      classes/page_with_filter_controls.php

2
classes/page_with_filter_controls.php

@ -171,7 +171,7 @@ class mod_attendance_page_with_filter_controls {
private function calc_sessgroupslist_sesstype() { private function calc_sessgroupslist_sesstype() {
global $SESSION; global $SESSION;
if (!array_key_exists('attsessiontype', $SESSION)) { if (!property_exists('attsessiontype', $SESSION)) {
$SESSION->attsessiontype = array($this->cm->course => self::SESSTYPE_ALL); $SESSION->attsessiontype = array($this->cm->course => self::SESSTYPE_ALL);
} else if (!array_key_exists($this->cm->course, $SESSION->attsessiontype)) { } else if (!array_key_exists($this->cm->course, $SESSION->attsessiontype)) {
$SESSION->attsessiontype[$this->cm->course] = self::SESSTYPE_ALL; $SESSION->attsessiontype[$this->cm->course] = self::SESSTYPE_ALL;

Loading…
Cancel
Save