Commit e341d8ec authored by Dries's avatar Dries

- Patch #1408636 by swentel, c31ck: fixed fatal error when viewing unpublished...

- Patch #1408636 by swentel, c31ck: fixed fatal error when viewing unpublished nodes with the translator module enabled.
parent 39b1878c
......@@ -532,7 +532,7 @@ function translation_language_switch_links_alter(array &$links, $type, $path) {
else {
// No translation in this language, or no permission to view.
unset($links[$langcode]['href']);
$links[$langcode]['attributes']['class'] = 'locale-untranslated';
$links[$langcode]['attributes']['class'][] = 'locale-untranslated';
}
}
}
......
......@@ -436,7 +436,7 @@ class TranslationTestCase extends DrupalWebTestCase {
$xpath = '//div[contains(@class, :type)]//a[@href=:url]';
}
else {
$xpath = '//div[contains(@class, :type)]//span[@class="locale-untranslated"]';
$xpath = '//div[contains(@class, :type)]//span[contains(@class, "locale-untranslated")]';
}
$found = $this->findContentByXPath($xpath, array(':type' => $type, ':url' => $url), $translation_language->name);
......
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