Problem/Motivation

routeHasModal function, which is used to check if the route is configured to open in modal, gets an error if the used route within a link is NULL.

Steps to reproduce

Add a link to a page with a route that doesn't exist and add this route to the routes to be opened in a modal within the module config.

Proposed resolution

Use the correct type hinting to allow a route to be NULL since the built in PHP function in_array will return false in this case.

Remaining tasks

Provide patch
Review patch

User interface changes

/

API changes

/

Data model changes

/

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

økse created an issue. See original summary.

  • økse committed 08d4c5a on 1.0.x
    Issue #3322169: TypeError: Drupal\route_in_modal\ModalRouteHelper::...
økse’s picture

Status: Active » Fixed

This has been fixed and merged.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.