Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
robocoder opened this Issue · 3 comments

2 participants

Anthon Pang Matthieu Aubry
Anthon Pang
Collaborator

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>
Matthieu Aubry
Owner

why wontfix? it sounds like a bug..

Anthon Pang
Collaborator

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

Anthon Pang
Collaborator

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

Anthon Pang robocoder added this to the Piwik 0.4.4 milestone
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.