Commit 49d199b3 authored by alexpott's avatar alexpott

Issue #2671946 by mikeryan: d6_url_alias_language should accept language as a scalar

parent fea95593
......@@ -19,7 +19,6 @@ process:
- dst
langcode:
plugin: d6_url_alias_language
source:
- language
source: language
destination:
plugin: url_alias
......@@ -25,8 +25,7 @@ class UrlAliasLanguage extends ProcessPluginBase {
* {@inheritdoc}
*/
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
$language = reset($value);
$langcode = ($language === '') ? LanguageInterface::LANGCODE_NOT_SPECIFIED : $language;
$langcode = ($value === '') ? LanguageInterface::LANGCODE_NOT_SPECIFIED : $value;
return $langcode;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment