mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-38147 fixed bug with windows PHP different function behaviour
This commit is contained in:
parent
5e71c37ea9
commit
0a02b80cda
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user