diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2005-01-02 19:12:56 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2005-01-02 19:12:56 +0000 |
commit | cf1d36aa775faa3a1760eae0e5a9740abdbebb5d (patch) | |
tree | 17f0c03322a0a0166110b728047566e1b0c78515 | |
parent | 52f17c49d7209b686c4733b8b3908ec4e9ca4b06 (diff) | |
download | forums-cf1d36aa775faa3a1760eae0e5a9740abdbebb5d.tar forums-cf1d36aa775faa3a1760eae0e5a9740abdbebb5d.tar.gz forums-cf1d36aa775faa3a1760eae0e5a9740abdbebb5d.tar.bz2 forums-cf1d36aa775faa3a1760eae0e5a9740abdbebb5d.tar.xz forums-cf1d36aa775faa3a1760eae0e5a9740abdbebb5d.zip |
- check for zero user_posts
git-svn-id: file:///svn/phpbb/trunk@5041 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r-- | phpBB/includes/ucp/ucp_main.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php index 3e08d4686d..c69e7a00d4 100644 --- a/phpBB/includes/ucp/ucp_main.php +++ b/phpBB/includes/ucp/ucp_main.php @@ -235,7 +235,7 @@ class ucp_main extends module $active_f_name = $active_f_row['forum_name']; $active_f_id = $active_f_row['forum_id']; $active_f_count = $active_f_row['num_posts']; - $active_f_pct = ($active_f_count / $user->data['user_posts']) * 100; + $active_f_pct = ($user->data['user_posts']) ? ($active_f_count / $user->data['user_posts']) * 100 : 0; } unset($active_f_row); @@ -245,7 +245,7 @@ class ucp_main extends module $active_t_name = $active_t_row['topic_title']; $active_t_id = $active_t_row['topic_id']; $active_t_count = $active_t_row['num_posts']; - $active_t_pct = ($active_t_count / $user->data['user_posts']) * 100; + $active_t_pct = ($user->data['user_posts']) ? ($active_t_count / $user->data['user_posts']) * 100 : 0; } unset($active_t_row); |