You can clone with
HTTPS or Subversion.
> Piwik removes url path section which contains 0, e.g.
> is recorded as
> in log table - which is incorrect.
see code in tracker/action and matching unit tests, need fixing
// remove empty categories
$split = array_filter($split);
filter out /0/ in url path like:
this is wrong!
Attachment: Fix for bug #745
Attachment 745_patch.txt appears to fix the problem by only removing empty-strings in the array_filter. This is accomplished using a filter function implemented as a static on the Piwik_Tracker_Action class (a lambda function could also be used, but I guess that would be less efficient).
Unit test tests/core/Tracker/Action.test.php has also been updated to include the given test case above. Unit test passes successfully.
Thanks. FYI "ClassName::StaticFunction" is a 5.2.x-ism for callbacks. In general, for backwards compatibility, we should be using this syntax, array('ClassName', 'StaticFunction'). However, in this specific case, I believe we can just use 'strlen' for the callback.
Attachment: 745 bugfix #2 - using 'strlen'
Yes, of course! Rather stupid of me, forgetting that 0 evaluates to false when that was the cause of the problem I was trying to fix.
I've attached 745_patch.2.txt which has the fix.
(In ) Fixes #745 - patch and test case by craigmj; thanks