Skip to content

Commit 81c1a06

Browse files
committed
Quote value before adding to query
1 parent ec37f00 commit 81c1a06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Model/DcaRelationsModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public static function getRelatedValues(string $table, string $field, mixed $val
147147
}
148148
}
149149

150-
return $connection->fetchFirstColumn('SELECT '.$relation['related_field'].' FROM '.$relation['table'].(!empty($values) ? (' WHERE '.$relation['reference_field']." IN ('".implode("','", $values)."')") : '').$order);
150+
return $connection->fetchFirstColumn('SELECT '.$relation['related_field'].' FROM '.$relation['table'].(!empty($values) ? (' WHERE '.$relation['reference_field'].' IN ('.$connection->getDatabasePlatform()->quoteStringLiteral(implode("','", $values)).')') : '').$order);
151151
}
152152

153153
/**

0 commit comments

Comments
 (0)