Methods with only optional params are improperly initialized
jk opened this issue · comments
Jens Kohl commented
If you have a function, where all parameters are optional and you call it without any parameters, the parameters wouldn't initialized with their default values. Instead they get numbered default values (i.e. param1 → 0, param2 → 1).
/**
* Unorderd params
* @url GET /unorderd
* @url GET /unorderd/$param1
* @url GET /unorderd/$param2/test/$param1
*/
public function unorderd($param1 = 'default', $param2 = 'default')
{
return array('param1' => $param1, 'param2' => $param2);
}
- Reproduce issue
- Write unit tests covering this issue
- Fix issue
- Release new version number