-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
BugFor errors / faults / flaws / inconsistencies etc.For errors / faults / flaws / inconsistencies etc.not-in-changelogFor issues or pull requests that should not be included in our release changelog on matomo.org.For issues or pull requests that should not be included in our release changelog on matomo.org.
Description
If you call the function
logEvent(category, action, name, value, customData, callback)
without parameter it shout gives an error.
(logConsoleError(‘Error while logging event: Parameters category and action must not be empty or filled with whitespaces’);
But it doesn’t. Because the line
if (trim(String(category)).length === 0 || trim(String(action)).length === 0) { ...
will not work. String(category) returns always 9 (the length of the word undefined) when categorie is empty
So the error will never been showed.
Metadata
Metadata
Assignees
Labels
BugFor errors / faults / flaws / inconsistencies etc.For errors / faults / flaws / inconsistencies etc.not-in-changelogFor issues or pull requests that should not be included in our release changelog on matomo.org.For issues or pull requests that should not be included in our release changelog on matomo.org.