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

liam mcdermott’s picture

Status: Active » Fixed

Thanks for this, good catch. I've committed a fix to CVS, it'll be available in the next -dev release.

capellic’s picture

Thanks for the fix!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.