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

piwik.js: setCustomVariable should not throw error when value is undefined #4938

Closed
mattab opened this issue Apr 2, 2014 · 2 comments
Closed
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Apr 2, 2014

When setCustomVariable is called with an undefined value:

Uncaught TypeError: Cannot call method 'slice' of undefined piwik.js:2483
Tracker.setCustomVariable piwik.js:2483
apply piwik.js:545
(anonymous function) piwik.js:3082
(anonymous function)

Spec:

  • when custom variable name is undefined, fail silently
  • when custom variable value is undefined, change to empty string
@mattab
Copy link
Member Author

mattab commented Apr 2, 2014

In 20a1ff4: Refs #4938 Adding test case which shows the error
this should fail the JavascriptTests travis build

@mattab
Copy link
Member Author

mattab commented Apr 2, 2014

In 6f9b869: Fixes #4938 make sure we deal with undefined parameters
Should make the JavascriptTests build green again

@mattab mattab added this to the 2.2.1 - Piwik 2.2.1 milestone Jul 8, 2014
@mattab mattab self-assigned this 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

1 participant