From 0a02b80cdaa2c3412a071024d33cab364b4164ae Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Wed, 27 Mar 2013 17:06:27 +1100 Subject: [PATCH] MDL-38147 fixed bug with windows PHP different function behaviour --- lib/coursecatlib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/coursecatlib.php b/lib/coursecatlib.php index c7f0fa5eee3..0faa0fbc1a0 100644 --- a/lib/coursecatlib.php +++ b/lib/coursecatlib.php @@ -123,7 +123,7 @@ class coursecat implements renderable, cacheable_object, IteratorAggregate { if (array_key_exists($name, self::$coursecatfields)) { if ($this->$name === false) { // property was not retrieved from DB, retrieve all not retrieved fields - $notretrievedfields = array_diff(self::$coursecatfields, array_filter(self::$coursecatfields)); + $notretrievedfields = array_diff_key(self::$coursecatfields, array_filter(self::$coursecatfields)); $record = $DB->get_record('course_categories', array('id' => $this->id), join(',', array_keys($notretrievedfields)), MUST_EXIST); foreach ($record as $key => $value) {