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

Refs #7560, avoid array to string conversion notice in DistributedList & descendents. #7562

Merged
merged 1 commit into from Mar 29, 2015

Conversation

diosmosis
Copy link
Member

Throws exception instead so a stack trace can be found.

@mattab Can you review? I can't reproduce the exact issue, and there's no stack trace in the error report, so maybe this isn't the best solution.

Refs #7560

…t & descendents. Throws exception instead so a stack trace can be found.
@diosmosis diosmosis added Bug For errors / faults / flaws / inconsistencies etc. Needs Review PRs that need a code review labels Mar 28, 2015
@diosmosis diosmosis added this to the Piwik 2.13.0 milestone Mar 28, 2015
mattab pushed a commit that referenced this pull request Mar 29, 2015
Refs #7560, avoid array to string conversion notice in DistributedList & descendents.
@mattab mattab merged commit 547fab2 into master Mar 29, 2015
@mattab mattab added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Mar 29, 2015
$item = (string)$item;
foreach ($items as $key => &$item) {
if (is_array($item)) {
throw new \InvalidArgumentException("Array item encountered in DistributedList::setAll() [ key = $key ].");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe it's worth dumping the array in the logger as well ?
(note: i've already merged PR)

@mnapoli mnapoli deleted the 7560_distributed_list branch April 9, 2015 00:40
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. Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants