• Resolved rda5009

    (@rda5009)


    Hello,

    Either by coincidence or actually related to the release of 4.6, I started receiving an error in my customized left-hand nav menu:

    Warning: Illegal string offset ‘gpage_id’ in /home/colle021/public_html/wp-content/plugins/cm-bp-nav/index.php on line 156

    None of my coding changed, but it seems like there is an issue now. Anyway, here is the snippet of code in question:

    foreach ( $groups as $group ) :
    
    				$group_pages = groups_get_groupmeta($group['group_id'],'bpge');
    
    				$items .='<li class="sub-menu-item"><a href="'.get_page_link($group_pages['gpage_id']).'">'.get_the_title($group_pages['gpage_id']).'</a>';
    
    			endforeach;

    Any thoughts on what would be making the warning message appear?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Not sure how much this will help you, i.e. – you probably already know this, but….

    In the PHP code you displayed, the function groups_get_groupmeta() is returning a string, rather than an array, value.

    Moderator t-p

    (@t-p)

    Your “cm-bp-nav” plugin seems to be the error.

    Unfortunately, NO plugin by the name of “cm-bp-nav” to be found in the WP free plugin directory:
    https://www.ads-software.com/plugins/search.php?q=cm-bp-nav

    If this is a commercial or customized plugin, we ask that you please go to their official support channel, so you can get support from the people who know it best.

    Forum volunteers are also not given access to commercial products, so they would not know why it is not working properly. Other community members who may have faced your issue might be able to help you but your best bet is your product’s developer. Keep in mind we encourage you to use the official support venues, as it allows the developers to be aware of issues with their code and gives back to the community in a more robust way.

    Thread Starter rda5009

    (@rda5009)

    Thanks for your response. It ended up being the version of PHP I was using.

    The plugin was custom developed, but the developer was unresponsive for assistance. That was why I came here.

    Moderator t-p

    (@t-p)

    You are welcome ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Illegal string offset warning’ is closed to new replies.