Skip to content

Advanced Metadata: Allow options in FieldDefinitionSelect to be null#11297

Open
Akumatic wants to merge 1 commit intoILIAS-eLearning:release_10from
Akumatic:fix/10/advancedmetadata/fielddefinitionselect/nullableOptions
Open

Advanced Metadata: Allow options in FieldDefinitionSelect to be null#11297
Akumatic wants to merge 1 commit intoILIAS-eLearning:release_10from
Akumatic:fix/10/advancedmetadata/fielddefinitionselect/nullableOptions

Conversation

@Akumatic
Copy link
Contributor

An exception is thrown if db_gateway->readByID in readOptions returns null because options is not allowed to be assigned null.

TypeError thrown with message "Cannot assign null to property ilAdvancedMDFieldDefinitionSelect::$options of type ILIAS
\AdvancedMetaData\Data\FieldDefinition\TypeSpecificData\Select\SelectSpecificData"

readOptions handles a null value by generating a new SelectSpecificDataImplementation object.

An exception is thrown if db_gateway->readByID returns null because `options` is not allowed to be assigned null.
`readOptions` handles a null value by generating a new SelectSpecificDataImplementation object.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants