Skip to content
Snippets Groups Projects
Commit 3ad5dfaf authored by Thijs Kinkhorst's avatar Thijs Kinkhorst
Browse files

Dance to the pipes of phpcs

parent 5e8a4118
No related branches found
No related tags found
No related merge requests found
......@@ -169,12 +169,19 @@ class Module
$config = Configuration::getInstance();
// rebuild REQUEST_URI and SCRIPT_NAME just in case we need to. This is needed for server aliases and rewrites
// rebuild REQUEST_URI and SCRIPT_NAME just in case we need to.
// This is needed for server aliases and rewrites
$translated_uri = $config->getBasePath() . 'module.php/' . $module . '/' . $url;
$request->server->set('REQUEST_URI', $translated_uri);
$request->server->set('SCRIPT_NAME', $config->getBasePath() . 'module.php');
// strip any NULL files (form file fields with nothing selected) because initialize() will throw an error on them
$request_files = array_filter($request->files->all(), function($val){return !is_null($val);});
// strip any NULL files (form file fields with nothing selected)
// because initialize() will throw an error on them
$request_files = array_filter(
$request->files->all(),
function ($val) {
return !is_null($val);
}
);
$request->initialize(
$request->query->all(),
$request->request->all(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment