aboutsummaryrefslogtreecommitdiff
path: root/lib/models/SimpleORMap.class.php
diff options
context:
space:
mode:
authorAndré Noack <noack@data-quest.de>2022-09-16 17:01:24 +0000
committerElmar Ludwig <elmar.ludwig@uni-osnabrueck.de>2022-09-16 17:01:24 +0000
commitbab824db34ee0c8be6570d6d5af4b94e3ebc7ff8 (patch)
tree754eb727797d910250bb2eb31f65c245e8d770bb /lib/models/SimpleORMap.class.php
parent1eecb89d95ec45ec3b1a339879652c6b716eb7b4 (diff)
Resolve #1588 "datafields collection an SORM Objekte ist immer leer"
Closes #1588 Merge request studip/studip!1017
Diffstat (limited to 'lib/models/SimpleORMap.class.php')
-rw-r--r--lib/models/SimpleORMap.class.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/models/SimpleORMap.class.php b/lib/models/SimpleORMap.class.php
index ab2c332..476e646 100644
--- a/lib/models/SimpleORMap.class.php
+++ b/lib/models/SimpleORMap.class.php
@@ -2142,7 +2142,7 @@ class SimpleORMap implements ArrayAccess, Countable, IteratorAggregate
if ($options['type'] === 'has_many') {
$records = function($record) use ($to_call, $params, $options) {
$p = (array)$params($record);
- return call_user_func_array($to_call, array_merge(count($p) ? $p : [null], [$options['order_by'] ?? '']));
+ return call_user_func_array($to_call, array_merge(count($p) ? $p : [null], [$options['order_by'] ?? null]));
};
$this->relations[$relation] = new SimpleORMapCollection($records, $options, $this);
} elseif ($options['type'] === 'has_and_belongs_to_many') {