Commit c839944b authored by catch's avatar catch
Browse files

fix: #3600694 locale_translate_file_attach_properties() BC layer incorrectly...

fix: #3600694 locale_translate_file_attach_properties() BC layer incorrectly always sets override langcode to undefined

By: ptmkenny
By: berdir
(cherry picked from commit ab7d042f)
parent 5be8c8bc
Loading
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -5,7 +5,6 @@
 */

use Drupal\Core\Batch\BatchBuilder;
use Drupal\Core\Language\LanguageInterface;
use Drupal\file\FileInterface;
use Drupal\locale\File\LocaleFile;
use Drupal\locale\File\LocaleFileManager;
@@ -219,9 +218,8 @@ function locale_translate_file_attach_properties($file, array $options = []) {
  else {
    $uri = $file->uri;
    $filename = $file->filename;
    $options['langcode'] = LanguageInterface::LANGCODE_NOT_SPECIFIED;
  }
  return LocaleFile::createFromPath($filename, $uri, $options['langcode']);
  return LocaleFile::createFromPath($filename, $uri, $options['langcode'] ?? NULL);
}

/**