Skip to content

Commit

Permalink
Max attributes value length : 254
Browse files Browse the repository at this point in the history
  • Loading branch information
Franck Allimant committed Nov 20, 2023
1 parent 9b7712f commit 0cd3353
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Trait/DataExtractorTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ public function getMappedValues(
$stmt->execute();

while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
$attributes[$key] = $row[$key];
// value should be less than 255 characters
$attributes[$key] = substr($row[$key], 0, 254);
if (\array_key_exists($key, $jsonMapping) && \array_key_exists($row[$key], $jsonMapping[$key])) {
$attributes[$key] = $jsonMapping[$key][$row[$key]];
}
Expand Down

0 comments on commit 0cd3353

Please sign in to comment.