[buddypress-trac] [BuddyPress] #4403: Fatal Error After Upgrading to BuddyPress 1.6

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Tue Aug 7 17:15:02 UTC 2012


#4403: Fatal Error After Upgrading to BuddyPress 1.6
--------------------------+--------------------
 Reporter:  steve7777     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  1.6.1
Component:  Core          |     Version:  1.6
 Severity:  major         |  Resolution:
 Keywords:                |
--------------------------+--------------------

Comment (by steve7777):

 I added the two functions

 function bpbp_displayed_user_id() {

         static $id = 0;

         if ( empty( $id ) ) {
                 global $bp;
                 $id = !empty( $bp->displayed_user->id ) ?
 $bp->displayed_user->id : 0;
         }

         return apply_filters( 'bpbp_displayed_user_id', $id );
 }

 function bpbp_loggedin_user_id() {

         static $id = 0;

         if ( empty( $id ) ) {
                 global $bp;
                 $id = !empty( $bp->loggedin_user->id ) ?
 $bp->loggedin_user->id : 0;
         }

         return apply_filters( 'bpbp_loggedin_user_id', $id );
 }

 to bp-core-template.php from bp-members-template.php, then changed all
 occurrences of bp_displayed_user_id and bp_loggedin_user_id to
 bpbp_displayed_user_id and bpbp_loggedin_user_id, resp. The name changes
 were done to avoid redeclaration errors when bp-members-template.php is
 loaded. Everything appears to be working properly now and I no longer seem
 to get the fatal error.

 The problem is definitely in the bp-core-template.php file but I don't
 know if adding the two new filters causes any other problems.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4403#comment:9>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list