From 659a275a68aaf9ddb62295c1bc17e7bd33750192 Mon Sep 17 00:00:00 2001 From: Daniel Thee Roperto Date: Thu, 17 Nov 2016 15:26:02 +1100 Subject: [PATCH] Issue #80 - Problem with PHP below 5.6.3 fixed. --- .travis.yml | 1 - classes/local/controllers/maintenance_static_page_generator.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c098173..be35c6d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,7 +35,6 @@ install: - moodle-plugin-ci install script: - - echo "nothing to do" - moodle-plugin-ci phplint - moodle-plugin-ci phpcpd - moodle-plugin-ci phpmd diff --git a/classes/local/controllers/maintenance_static_page_generator.php b/classes/local/controllers/maintenance_static_page_generator.php index 82620ac..f27c48c 100644 --- a/classes/local/controllers/maintenance_static_page_generator.php +++ b/classes/local/controllers/maintenance_static_page_generator.php @@ -275,7 +275,7 @@ class maintenance_static_page_generator { $meta->setAttribute('http-equiv', 'refresh'); $meta->setAttribute('content', $this->refreshtime); - $head = $this->dom->getElementsByTagName('head')[0]; + $head = $this->dom->getElementsByTagName('head')->item(0); if ($head) { $head->appendChild($meta); }