diff --git a/src/Context/ContentContext.php b/src/Context/ContentContext.php index 330863b..6192270 100644 --- a/src/Context/ContentContext.php +++ b/src/Context/ContentContext.php @@ -479,7 +479,7 @@ protected function getAllCriterion(string $contentType, TableNode $table = null) $ct = $this->repo->getContentTypeService()->loadContentTypeByIdentifier($contentType); if (null !== $table) { foreach ($table->getRowsHash() as $key => $value) { - $fieldType = $ct->getFieldDefinition($key)->fieldTypeIdentifier; + $fieldType = $ct->getFieldDefinition($key)?->fieldTypeIdentifier; $criterion = $this->getCriterion($fieldType, $key, $value); if (null !== $criterion) { $criterions[] = $criterion; @@ -520,8 +520,8 @@ protected function postCheckAll(string $contentType, TableNode $table = null, Co $ct = $this->repo->getContentTypeService()->loadContentTypeByIdentifier($contentType); if (null !== $table) { foreach ($table->getRowsHash() as $key => $val) { - $fieldType = $ct->getFieldDefinition($key)->fieldTypeIdentifier; - $this->postCheck($fieldType, $key, $val, $content->getField($key)->value); + $fieldType = $ct->getFieldDefinition($key)?->fieldTypeIdentifier; + $this->postCheck($fieldType, $key, $val, $content->getField($key)?->value); } } }