Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Calling API with serialize=0, get: Array to string conversion in core/dispatch.php on line 37 #5144

Closed
mattab opened this Issue · 1 comment

1 participant

Matthieu Aubry
Matthieu Aubry
Owner

This was reported in the forums

Can be reproduced locally with: http://localhost/piwik-master/index.php?module=API&method=API.get&format=PHP&idSite=1&period=day&date=2014-05-02,2014-05-11&expanded=1&token_auth=XXXXXXXX&filter_limit=30&serialize=0

Notice: Array to string conversion in core/dispatch.php on line 37

Matthieu Aubry
Owner

In 97402e9: Fixes #5144 When the response being dispatched is an array, var_export it instead of echo

Matthieu Aubry mattab added this to the 2.3.0 - Piwik 2.3.0 milestone
Matthieu Aubry mattab self-assigned this
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab Fixes #5144 When the response being dispatched is an array, `var_expo…
…rt` it instead of `echo`
97402e9
Thomas Steur tsteur referenced this issue from a commit
Thomas Steur tsteur refs #5144 better fix for array to string to conversion.
Noticed this hack while I worked on the tracker refactoring. Dispatch
should always return a string. Fixing the problem where it actually occurs.
An even better fix would be not to support serialize=0 for format PHP as
it is meant only for internal requests. If someone wants to access data
serialize=1 should be set.
54ce7af
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.