Closed (fixed)
Project:
User Stats
Version:
5.x-1.0-beta
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Mar 2008 at 14:18 UTC
Updated:
27 Mar 2008 at 21:54 UTC
I have my post count filtered to only count Forum entries. Many new users do not have forum posts. Therefore, when I am displaying the count for 'post_days', I am getting a very large number do to the fact that _user_stats_last_post($user) is equaled to 0 in case 'post_days' in function user_stats_get_stats().
This is how I solved the issue:
case 'post_days':
if (_user_stats_last_post($user) == 0) {
return 'n/a';
} else {
return floor((time() - _user_stats_last_post($user)) / 86400);
}
Comments
Comment #1
liam mcdermott commentedThanks for this, good catch. I've committed a fix to CVS, it'll be available in the next -dev release.
Comment #2
capellicThanks for the fix!
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.