Skip to content

Commit

Permalink
fix: make sure getWidget not return null
Browse files Browse the repository at this point in the history
  • Loading branch information
bartlomiejmarszal committed Nov 22, 2024
1 parent d8b3ce5 commit cdc384b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion model/qti/metadata/ontology/MappedMetadataInjector.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ public function inject(array $mappedProperties, array $metadataValues, Resource
if ($currentValue && $currentValue === $metadataValue->getValue()) {
continue;
}
if ($mappedProperties[$mappedPath]->getWidget()->getUri() === ReadOnlyWidget::WIDGET_ID) {
if (
$mappedProperties[$mappedPath]->getWidget()
&& $mappedProperties[$mappedPath]->getWidget()->getUri() === ReadOnlyWidget::WIDGET_ID
) {
continue;
}
if (
Expand Down

0 comments on commit cdc384b

Please sign in to comment.