From 78a6821b2fecff7512134c2269c96103ecf81628 Mon Sep 17 00:00:00 2001 From: rGaillard Date: Mon, 2 Dec 2013 16:14:27 +0100 Subject: [PATCH] // handle img extensions in the end of query string in the dispatcher --- classes/Dispatcher.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/Dispatcher.php b/classes/Dispatcher.php index e6aab3c95..1f04b57e8 100644 --- a/classes/Dispatcher.php +++ b/classes/Dispatcher.php @@ -716,7 +716,7 @@ class DispatcherCore $controller = $this->controller_not_found; // If the request_uri matches a static file, then there is no need to check the routes, we keep "controller_not_found" (a static file should not go through the dispatcher) - if (!preg_match('/\.(gif|jpe?g|png|css|js|ico)$/i', $this->request_uri)) + if (!preg_match('/\.(gif|jpe?g|png|css|js|ico)$/i', parse_url($this->request_uri, PHP_URL_PATH))) { // Add empty route as last route to prevent this greedy regexp to match request uri before right time if ($this->empty_route)