jk/RestServer — Issue #4: Methods with only optional params are improperly initialized
Author: jk
Created: 2011-12-08 11:32:24+00:00
State: open
Labels: Bug

If you have a function, where all parameters where optional and you call it w/o any parameters, the params wouldn't initialized with their default values. Instead they get numbered default values (i.e. param1 → 0, param2 → 1).

```php
/**
* 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)
}
```