Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/lib/FieldType/Image/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -438,12 +438,12 @@ public function fromPersistenceValue(FieldValue $fieldValue)
'imageId' => (isset($fieldValue->data['imageId'])
? $fieldValue->data['imageId']
: null),
'width' => (isset($fieldValue->data['width'])
'width' => ($fieldValue->data['width'] ?? '') !== ''
Copy link
Copy Markdown
Contributor Author

@vidarl vidarl Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be the most convenient place to do this check, but is this the correct place to add it?
Alternatives are:

? $fieldValue->data['width']
: null),
'height' => (isset($fieldValue->data['height'])
: null,
'height' => ($fieldValue->data['height'] ?? '') !== ''
? $fieldValue->data['height']
: null),
: null,
'additionalData' => $fieldValue->data['additionalData'] ?? [],
'mime' => $fieldValue->data['mime'] ?? null,
]
Expand Down
Loading