[buddypress-trac] [BuddyPress Trac] #8076: Bug in user count ->

buddypress-trac noreply at wordpress.org
Tue Apr 2 01:56:06 UTC 2019


#8076: Bug in user count ->
--------------------------+-----------------------------
 Reporter:  lordofdoom    |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Templates     |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 There is a bug in buddypress/bp-templates/bp-nouveau/includes/template-
 tags.php

 $nav_item->count return a string, but if a site have more than 1k users
 this string will be 1,000 -> So the integer will be 1

 Line 1247 need to get changed from:

 {{{#!php
 <?php
                 if ( 'directory' === $bp_nouveau->displayed_nav ) {
                         $count = (int) $nav_item->count;
 }}}


 to e.g.:

 {{{#!php
 <?php
                 if ( 'directory' === $bp_nouveau->displayed_nav ) {
                         $count =
 intval(str_replace(",","",$nav_item->count));
 }}}

 Thank you :-)

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8076>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list