Skip to content

Commit 4a9c494

Browse files
committed
[BUGFIX] Prevent missing array key exception in PHP8
Related: #781
1 parent bdf52eb commit 4a9c494

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Classes/Hook/CreateMarker.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,9 @@ protected function addNewFields(): void
239239
protected function getFieldObjectFromProperties(array $properties, string $uid = '0'): Field
240240
{
241241
$dataMapper = GeneralUtility::makeInstance(DataMapper::class);
242+
if (isset($properties['uid']) === false) {
243+
$properties['uid'] = null;
244+
}
242245
$field = $dataMapper->map(Field::class, [$properties])[0];
243246
if (!empty($properties['sys_language_uid'])) {
244247
$field->_setProperty('_languageUid', (int)$properties['sys_language_uid']);

0 commit comments

Comments
 (0)