BuddyBoss Home – Web Support Forums Themes Boss. theme Warning on profile page, users-options line 22

Viewing 7 posts - 1 through 7 (of 7 total)
  • Question

    #61519
    @laurenlund

    I just updated to 2.1.3… Should I revert to 2.1.1 to avoid any issues?

    After updating, I’m seeing this problem on my profile page:

    Warning: Invalid argument supplied for foreach() in /wp-content/themes/boss/buddyboss-inc/users-options.php on line 22

    And at the top of any post page:

    Warning
    : Invalid argument supplied for foreach() in
    /home/bluespruce/public_html/clubhouse/wp-content/themes/boss/single.php
    on line
    124

    These occurred after I updates the boss theme and buddypress… Kept the child theme the same.

    Any help would be appreciated!

    ~Lauren

    Answers

    #61524
    @laurenlund

    Just turned off all my plugins except for buddypress AND switched to the new boss theme (not child theme) and still having the same issue.

    #61640
    @vapvarun

    Hi @laurenlund
    Please send your login details from our contact page, i will check it at your site.
    Regards
    Varun Dubey

    #61643
    @laurenlund

    Hey Varun, 

    I fixed the error by going to boss theme options and shutting off the social settings. 

    However, if I turn them back on I still get the error.

    These options were difficult to find! 

    Social media would be nice to include if the error wasn't occurring…

    I will send my login credentials now. Thank you.

    ~Lauren

    #63534
    @vapvarun

    Hi @laurenlund, Sorry for delayed response.
    Please send the login details again , I have not received them yet
    Regards
    Varun Dubey

    #63710
    @pureion

    @vapvarun I am having the same problem on localhost. Please post any solution here. Thanks!

    #63720
    @vapvarun

    Hi @pureion
    at Line 16
    /boss/buddyboss-inc/users-options.php

    replace

    
    function buddyboss_get_user_social_array() {
    
    	$social_profiles = boss_get_option( 'profile_social_media_links' );
    
    	$socials = array();
    
    	foreach ( $social_profiles as $label ) {
    
    		if ( empty( $label['name'] ) ) {
    			continue;
    		}
    
    		$key = sanitize_title( $label['name'] );
    		$socials[ $key ] = $label['name'];
    	}
    
    	return (array) @apply_filters( "buddyboss_get_user_social_array", $socials );
    }
    

    with

    
    function buddyboss_get_user_social_array() {
    
    	$social_profiles = boss_get_option( 'profile_social_media_links' );
    
        $socials = array( "facebook"		 => __( "Facebook", "boss" ),
    		"twitter"		 => __( "Twitter", "boss" ),
    		"linkedin"		 => __( "Linkedin", "boss" ),
    		"google-plus"	 => __( "Google+", "boss" ),
    		"youtube"		 => __( "Youtube", "boss" ),
    		"instagram"		 => __( "Instagram", "boss" ),
    		"pinterest"		 => __( "Pinterest", "boss" ) );
    	if (is_array($social_profiles) || is_object($social_profiles)) {
    	foreach ( $social_profiles as $label ) {
    
    		if ( empty( $label['title'] ) ) {
    			continue;
    		}
    
    		$key = sanitize_title( $label['title'] );
    		$socials[ $key ] = $label['title'];
    	} 
    	}
    
    	return (array) @apply_filters( "buddyboss_get_user_social_array", $socials );
    }
    

    Regards
    Varun Dubey

Viewing 7 posts - 1 through 7 (of 7 total)
  • The question ‘Warning on profile page, users-options line 22’ is closed to new replies.