Skip to content

Commit b2f74a6

Browse files
committed
AdvMD: fix reading select fields for missing adv_mdf_enum entries
1 parent 96f7202 commit b2f74a6

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

components/ILIAS/AdvancedMetaData/classes/Types/class.ilAdvancedMDFieldDefinitionSelect.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -902,12 +902,14 @@ public function prepareElementForEditor(ilADTFormBridge $a_bridge): void
902902

903903
protected function readOptions(): void
904904
{
905+
$options = null;
905906
if ($this->getFieldId()) {
906-
$this->options = $this->db_gateway->readByID($this->getFieldId());
907+
$options = $this->db_gateway->readByID($this->getFieldId());
907908
}
908-
if (!isset($this->options)) {
909-
$this->options = new SelectSpecificDataImplementation();
909+
if ($options === null) {
910+
$options = new SelectSpecificDataImplementation();
910911
}
912+
$this->options = $options;
911913

912914
$record = ilAdvancedMDRecord::_getInstanceByRecordId($this->getRecordId());
913915
$this->default_language = $record->getDefaultLanguage();

0 commit comments

Comments
 (0)