Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API doesn't handle null default parameters well... #953

Closed
robocoder opened this issue Aug 26, 2009 · 3 comments
Closed

API doesn't handle null default parameters well... #953

robocoder opened this issue Aug 26, 2009 · 3 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@robocoder
Copy link
Contributor

Let's say API.php contains:

public function test($idSite = null)
{
}

Unless the method is called with idSite non-empty, Piwik returns:

<result>
<error message="The parameters are not valid. The method called requires 0 parameters. Please check your URL and the method API."/>
</result>
@mattab
Copy link
Member

mattab commented Aug 26, 2009

why wontfix? it sounds like a bug..

@robocoder
Copy link
Contributor Author

The exception is generated in the check for null parameters. So, I assumed this was by design/intentional.

@robocoder
Copy link
Contributor Author

In [1466], fixes #953 - API doesn't handle default null parameters; remove checkParametersAreNotNull

@robocoder robocoder added this to the Piwik 0.4.4 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

2 participants