diff --git a/core/includes/form.inc b/core/includes/form.inc index 9af4eed..f79ac81 100644 --- a/core/includes/form.inc +++ b/core/includes/form.inc @@ -354,8 +354,8 @@ function template_preprocess_form(&$variables) { foreach ($element['#errors'] as $key => $error) { if (($form_element = FormElementHelper::getElementByName($key, $element)) && Element::isVisibleElement($form_element)) { $title = FormElementHelper::getElementTitle($form_element); - $error_links['@'.$key] = \Drupal::l('@'.$key, Url::fromRoute('', [], ['fragment' => 'edit-' . str_replace('_', '-', $key), 'external' => TRUE])); - $error_titles['@'.$key] = $title; + $error_links['@' . $key] = \Drupal::l('@' . $key, Url::fromRoute('', [], ['fragment' => 'edit-' . str_replace('_', '-', $key), 'external' => TRUE])); + $error_titles['@' . $key] = $title; } else { drupal_set_message($error, 'error'); diff --git a/core/modules/shortcut/src/Tests/ShortcutSetsTest.php b/core/modules/shortcut/src/Tests/ShortcutSetsTest.php index 34f394d..e1f3771 100644 --- a/core/modules/shortcut/src/Tests/ShortcutSetsTest.php +++ b/core/modules/shortcut/src/Tests/ShortcutSetsTest.php @@ -130,7 +130,7 @@ function testShortcutSetSwitchCreate() { function testShortcutSetSwitchNoSetName() { $edit = array('set' => 'new'); $this->drupalPostForm('user/' . $this->adminUser->id() . '/shortcuts', $edit, t('Change set')); - $this->assertText(t('The new set label is required.')); + $this->assertRaw(t('1 error has been found: New set')); $current_set = shortcut_current_displayed_set($this->adminUser); $this->assertEqual($current_set->id(), $this->set->id(), 'Attempting to switch to a new shortcut set without providing a set name does not succeed.'); }