We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65cf2fd commit 045cb9eCopy full SHA for 045cb9e
src/lib/FieldType/Image/SearchField.php
@@ -18,8 +18,13 @@ class SearchField implements Indexable
18
{
19
public function getIndexData(Field $field, FieldDefinition $fieldDefinition)
20
21
- $width = $field->value->data['width'] ?? null;
22
- $height = $field->value->data['height'] ?? null;
+ $width = isset($field->value->data['width']) && $field->value->data['width'] !== null
+ ? (int)$field->value->data['width']
23
+ : null;
24
+
25
+ $height = isset($field->value->data['height']) && $field->value->data['height'] !== null
26
+ ? (int)$field->value->data['height']
27
28
29
return [
30
new Search\Field(
0 commit comments