Filter all keys starting with underscore

This commit is contained in:
Laurynas Veržukauskas 2014-03-18 22:23:36 +02:00
parent 27d3939d30
commit 343ecdfa0f

View File

@ -49,7 +49,7 @@ class Router implements HttpServerInterface {
$parameters = array();
foreach($route as $key => $value) {
if (!in_array($key, array('_controller', '_route'))) {
if ((is_string($key)) && ('_' !== substr($key, 0, 1))) {
$parameters[$key] = $value;
}
}