Skip to content

Commit

Permalink
[BUGFIX][HELV-93] Cast community translations to strings to prevent t…
Browse files Browse the repository at this point in the history
…ype error on string specific functions
  • Loading branch information
MatthijsBreed committed Aug 9, 2021
1 parent cef8b18 commit 457433f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Model/TranslationCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ public function createNewTranslations($translations, $storeId, $locale)
{
$insertionCount = 0;
foreach ($translations as $originalString => $translate) {
/**
* Explicitly cast to string since community engineering translations can contain phrases
* that Magento parsing returns as integer
*/
$originalString = (string) $originalString;
$translate = (string) $translate;
/**
* Due to Magento table limitation strings longer than 255 characters
* are being cut off, so these are excluded for now
Expand Down

0 comments on commit 457433f

Please sign in to comment.