FriendsOfSymfony/FOSRestBundle — pull request #307 by borisguery (2012-10-02 20:11:45+00:00)
Title: Default value and strict parameters

I wrote PoC for #306 and #301.

>Since the PR #291 has been merged I've got the following exception:
>
>```
Query parameter value '' is not a scalar
>```
> This is actually because in the ParamFetcher::get the default value is null and not scalar so it does not pass the is_scalar test since I have set the $strict var to true, it fails.
>
>However I wish the ParamFetcher::cleanParamWithRequirements() method "strictly" validates my parameters, that's why I really need the "$strict" variable to be kept true.
>
>I can make a PR with a patch but I would like your point of view upfront.

I'm not sure it is the most elegant way to solve the problem neither if it should be solved but it seems legitime to.

However, I think it is excepted to throw an Exception when using `strict` option without an explicitly set default value.

@lsmith77, any thoughts?