We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03bc461 commit 908f9c9Copy full SHA for 908f9c9
application/config/config.php
@@ -471,3 +471,4 @@
471
$config['proxy_ips'] = '';
472
473
$config['rewrite_extension'] = "cgi";
474
+$config['strict_function_params'] = true;
system/core/CodeIgniter.php
@@ -455,7 +455,12 @@ function &get_instance()
455
if ($param->isDefaultValueAvailable()) {
456
$context_args[] = $param->getDefaultValue();
457
} else {
458
- $context_args[] = null;
+ if ($CFG->config['strict_function_params']) {
459
+ echo json_encode(['code' => 500, 'message' => 'Params `' . $param->getName() . "` Not Required"]);
460
+ exit();
461
+ } else {
462
+ $context_args[] = null;
463
+ }
464
}
465
466
$context_args[] = !strlen($vars[$param->getName()]) == 0 ? $vars[$param->getName()] : null;
0 commit comments