Commit 5a0537e6 authored by alexpott's avatar alexpott

Issue #2979931 by maxocub, masipila: Warnings in EntityTranslationSettings...

Issue #2979931 by maxocub, masipila: Warnings in EntityTranslationSettings when upgrading with drush
parent 70b5d870
......@@ -65,7 +65,10 @@ protected function initializeIterator() {
// Find out which vocabulary uses entity translation by looking at the
// 'entity_translation_taxonomy' variable.
$vocabularies = array_keys(array_filter($results['entity_translation_taxonomy']));
$vocabularies = [];
if (isset($results['entity_translation_taxonomy']) && is_array($results['entity_translation_taxonomy'])) {
$vocabularies = array_keys(array_filter($results['entity_translation_taxonomy']));
}
if (in_array('node', $entity_types, TRUE) && !empty($node_types)) {
// For each node type that uses entity translation, check if a
......
......@@ -112,6 +112,15 @@ public function providerSource() {
],
];
// Source data when taxonomy terms are translatable but the
// 'entity_translation_taxonomy' variable is not set.
$tests[3]['source_data']['variable'] = [
[
'name' => 'entity_translation_entity_types',
'value' => 'a:4:{s:7:"comment";i:0;s:4:"node";i:0;s:13:"taxonomy_term";i:1;s:4:"user";i:0;}',
],
];
// Expected data when there's no entity type that uses entity translation.
$tests[0]['expected_data'] = [];
......@@ -235,6 +244,10 @@ public function providerSource() {
],
];
// Expected data when taxonomy terms are translatable but the
// 'entity_translation_taxonomy' variable is not set.
$tests[3]['expected_data'] = [];
return $tests;
}
......
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