Skip to content

Commit a76a0fd

Browse files
committed
adapt query to engine
1 parent 02f07cd commit a76a0fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Glpi/Asset/CustomFieldType/DropdownType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public function getSearchOption(): ?array
155155
$opt['joinparams']['condition'] = [
156156
QueryFunction::jsonContains([
157157
'REFTABLE.custom_fields',
158-
QueryFunction::cast('NEWTABLE.id', 'JSON'),
158+
preg_match('/-MariaDB/', $DB->getVersion()) ? 'NEWTABLE.id' : QueryFunction::cast('NEWTABLE.id', 'JSON'),
159159
new QueryExpression($DB::quoteValue('$."' . $this->custom_field->fields['id'] . '"')),
160160
]),
161161
];

0 commit comments

Comments
 (0)