aboutsummaryrefslogtreecommitdiff
path: root/lib/models/SimpleORMap.class.php
diff options
context:
space:
mode:
authorMoritz Strohm <strohm@data-quest.de>2022-09-28 14:24:20 +0000
committerMoritz Strohm <strohm@data-quest.de>2022-09-28 14:24:20 +0000
commite75c08bedd60a6674d22ce3e2ec57b5a5f1d85eb (patch)
tree2d9cf000153360bdc9e1841693406f3a3b1d58ae /lib/models/SimpleORMap.class.php
parent1e6f3d59c1989dc0da68d3200090cb4768ab3094 (diff)
fix for BIESt #1118
Merge request studip/studip!676
Diffstat (limited to 'lib/models/SimpleORMap.class.php')
-rw-r--r--lib/models/SimpleORMap.class.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/models/SimpleORMap.class.php b/lib/models/SimpleORMap.class.php
index 5fed34a..bc670d8 100644
--- a/lib/models/SimpleORMap.class.php
+++ b/lib/models/SimpleORMap.class.php
@@ -1094,14 +1094,14 @@ class SimpleORMap implements ArrayAccess, Countable, IteratorAggregate
}
if ($type === 'has_and_belongs_to_many') {
$thru_table = $options['thru_table'];
- if (!$options['thru_key']) {
+ if (empty($options['thru_key'])) {
$options['thru_key'] = $this->pk()[0];
}
if (empty($options['thru_assoc_key']) || empty($options['assoc_foreign_key'])) {
$class = $options['class_name'];
$record = new $class();
$meta = $record->getTableMetadata();
- if (!$options['thru_assoc_key'] ) {
+ if (empty($options['thru_assoc_key'])) {
$options['thru_assoc_key'] = $meta['pk'][0];
}
if (empty($options['assoc_foreign_key'])) {