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

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

Closed
mattab opened this issue May 12, 2014 · 1 comment
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@mattab
Copy link
Member

mattab commented May 12, 2014

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

@mattab
Copy link
Member Author

mattab commented May 12, 2014

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

@mattab mattab added this to the 2.3.0 - Piwik 2.3.0 milestone Jul 8, 2014
@mattab mattab self-assigned this Jul 8, 2014
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
tsteur added a commit that referenced this issue Dec 4, 2014
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.
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

1 participant