Skip to content

[WebProfiler] adding a condition in routing.yml breaks the router panel #17342

@brunoroux

Description

@brunoroux

Adding a condition (using a regex match on the HTTP_HOST of the request) in my routing.yml breaks the WebProfiler router panel.

My routing.yml is as follows :

app:
    resource: "@AppBundle/Controller/"
    type:     annotation
    condition: "request.server.get('HTTP_HOST') matches '/dev\.local/'"

The minimum reproducing repo can be found here : https://github.com/brunoroux/symfony-standard/tree/bug/profiler

Accessing : http://dev.local/app_dev.php/_profiler/6ae9ed?panel=router throws a Twig_Error_Runtime :
An exception has been thrown during the rendering of a template ("Unable to get a property on a non-object.") in @WebProfiler/Collector/router.html.twig at line 13.

Edit : Forgot to mention that used version is 2.8

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy