Skip to content
Snippets Groups Projects
Unverified Commit 8ead4a5e authored by Jaime Pérez Crespo's avatar Jaime Pérez Crespo
Browse files

Use substr() instead of preg_match() when no preg is actually used.

parent 5ba98e8a
No related branches found
No related tags found
No related merge requests found
......@@ -220,7 +220,7 @@ class Module
throw new Error\NotFound('The URL wasn\'t found in the module.');
}
if (preg_match('#\.php$#D', $path)) {
if (substr($path, -4) === '.php') {
// PHP file - attempt to run it
/* In some environments, $_SERVER['SCRIPT_NAME'] is already set with $_SERVER['PATH_INFO']. Check for that
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment