Skip to content

1.6.2 Fix: Query string incorrectly included in template path lookup

Latest

Choose a tag to compare

@gemvc gemvc released this 02 Dec 15:40
e409666

Problem

When accessing URLs with query parameters (e.g., /en/product?id=1),
the router was looking for a template named product?id=1.twig instead of product.twig.

Solution

Use parse_url($uri, PHP_URL_PATH) to extract only the path component
from REQUEST_URI before passing it to the Request object.

Files Changed

  • src/Core/Application.php - createRequest() method