diff --git a/core/modules/contact/lib/Drupal/contact/Controller/ContactPageController.php b/core/modules/contact/lib/Drupal/contact/Controller/ContactPageController.php index fed3d5b..86d0b2f 100644 --- a/core/modules/contact/lib/Drupal/contact/Controller/ContactPageController.php +++ b/core/modules/contact/lib/Drupal/contact/Controller/ContactPageController.php @@ -47,6 +47,13 @@ class ContactPageController implements ControllerInterface { protected $entityManager; /** + * The translator service. + * + * @var \Drupal\Core\StringTranslation\Translator\TranslatorInterface + */ + protected $translator; + + /** * Constructs a ContactController object. * * @param \Drupal\Core\Flood\FloodInterface $flood @@ -101,9 +108,7 @@ public function contactCategoryForm($contact_category_id, AccountInterface $_acc if (empty($contact_category)) { if ($_account->hasPermission('administer contact forms')) { drupal_set_message(t('The contact form has not been configured. Add one or more categories to the form.', array('@add' => url('admin/structure/contact/add'))), 'error'); - debug("$contact_category_id"); - debug($contact_category, $contact_category_id); - return array('#markup' => 'errrrr'); + return array(); } else { throw new NotFoundHttpException(); @@ -127,10 +132,6 @@ public function contactCategoryForm($contact_category_id, AccountInterface $_acc * * @return array * The form as render array as expected by drupal_render(). - * - * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException - * Exception is thrown when user tries to access non existing contact - * category form and does not have permissions to set it up. */ public function contactSitePage(AccountInterface $_account) { // Check if flood control has been activated for sending e-mails. @@ -153,10 +154,6 @@ public function contactSitePage(AccountInterface $_account) { * * @return array * The form as render array as expected by drupal_render(). - * - * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException - * Exception is thrown when user tries to access non existing contact - * category form and does not have permissions to set it up. */ public function contactSitePageCategory(Category $contact_category, AccountInterface $_account) { // Check if flood control has been activated for sending e-mails.