Skip to content
Snippets Groups Projects
Verified Commit 833e599d authored by quietone's avatar quietone
Browse files

Issue #2479449 by sudiptadas19, smustgrave, akashkumar07, rithesh bk, rpayanm,...

Issue #2479449 by sudiptadas19, smustgrave, akashkumar07, rithesh bk, rpayanm, pradhumanjain2311, tstoeckler, mrinalini9, tatisilva, larowlan, andypost, dawehner, xjm, yesct: contact_menu_local_tasks_alter() should check whether ['tabs'][0] is set
parent 2319f339
No related branches found
No related tags found
13 merge requests!11131[10.4.x-only-DO-NOT-MERGE]: Issue ##2842525 Ajax attached to Views exposed filter form does not trigger callbacks,!3878Removed unused condition head title for views,!3818Issue #2140179: $entity->original gets stale between updates,!3154Fixes #2987987 - CSRF token validation broken on routes with optional parameters.,!3133core/modules/system/css/components/hidden.module.css,!2964Issue #2865710 : Dependencies from only one instance of a widget are used in display modes,!2812Issue #3312049: [Followup] Fix Drupal.Commenting.FunctionComment.MissingReturnType returns for NULL,!2062Issue #3246454: Add weekly granularity to views date sort,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!617Issue #3043725: Provide a Entity Handler for user cancelation,!579Issue #2230909: Simple decimals fail to pass validation,!560Move callback classRemove outside of the loop,!555Issue #3202493
Pipeline #318798 passed with warnings
Pipeline: drupal

#318824

    Pipeline: drupal

    #318814

      Pipeline: drupal

      #318805

        ......@@ -98,7 +98,7 @@ function contact_entity_extra_field_info() {
        * email address configured.
        */
        function contact_menu_local_tasks_alter(&$data, $route_name) {
        if ($route_name == 'entity.user.canonical') {
        if ($route_name == 'entity.user.canonical' && isset($data['tabs'][0])) {
        foreach ($data['tabs'][0] as $href => $tab_data) {
        if ($href == 'entity.user.contact_form') {
        $link_params = $tab_data['#link']['url']->getRouteParameters();
        ......
        <?php
        declare(strict_types=1);
        namespace Drupal\Tests\contact\Unit;
        use Drupal\Tests\UnitTestCase;
        /**
        * @group contact
        */
        class ContactTest extends UnitTestCase {
        /**
        * Test contact_menu_local_tasks_alter doesn't throw warnings.
        */
        public function testLocalTasksAlter(): void {
        require_once $this->root . '/core/modules/contact/contact.module';
        $data = [];
        \contact_menu_local_tasks_alter($data, 'entity.user.canonical');
        $this->assertTrue(TRUE, 'No warning thrown');
        }
        }
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Finish editing this message first!
        Please register or to comment