[buddypress-trac] [BuddyPress Trac] #8865: Filtering nouveau members buttons causing notice

buddypress-trac noreply at wordpress.org
Mon Apr 3 13:55:10 UTC 2023


#8865: Filtering nouveau members buttons causing notice
--------------------------+-----------------------
 Reporter:  raviousprime  |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  11.2.0
Component:  Templates     |    Version:  11.1.0
 Severity:  normal        |   Keywords:  has-patch
--------------------------+-----------------------
 When i am trying to reset members buttons in loop on my custom screen
 causing array to string notice

 {{{#!php
 <?php
        // Current version of plugin
         $buttons_group = apply_filters( 'bp_nouveau_get_members_buttons',
 $buttons, $user_id, $type, $args );

         if ( ! $buttons_group ) {
              return $buttons;
         }
 }}}

 My fix

 {{{#!php
 <?php
         $buttons_group = apply_filters( 'bp_nouveau_get_members_buttons',
 $buttons, $user_id, $type, $args );

         if ( ! $buttons_group ) {
              // empty array or buttons group itself.
              return $buttons_group;
         }
 }}}

 Please have a look.

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


More information about the buddypress-trac mailing list