MDL-38147 fixed bug with windows PHP different function behaviour

This commit is contained in:
Marina Glancy 2013-03-27 17:06:27 +11:00
parent 5e71c37ea9
commit 0a02b80cda

View File

@ -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) {