php warning on CB 2.0

9 years 6 months ago #250188 by activha
php warning on CB 2.0 was created by activha
Hello
I have noticed the following warning on CB 2.0 for your info

Warning: key() expects parameter 1 to be array, string given in /Applications/MAMP/htdocs/mysite.com/libraries/CBLib/CB/Legacy/CBuser.php on line 729

Please Log in to join the conversation.

9 years 6 months ago #250193 by beat
Replied by beat on topic php warning on CB 2.0
Hi activha,

activha wrote: Hello
I have noticed the following warning on CB 2.0 for your info

Warning: key() expects parameter 1 to be array, string given in /Applications/MAMP/htdocs/mysite.com/libraries/CBLib/CB/Legacy/CBuser.php on line 729


At very first glance this seems due to a menu that you are referring to in a CB substitution to display that menu or its link in a given location, but that this menu doesn't exist anymore in CB 2.0. It could be the "About Community Builder" menu, if you didn't personalize that one, it gets removed by the upgrade.

We need to further investigate this warning and will fix it.

I have opened bug tracker #4759 to track this issue.

In the mean time, if you have no idea which menu that could be, you can replace that line 729 by:
if ( is_array( $arrayPos ) && key( $arrayPos ) == trim( $menuName ) ) {

to silence the warning. Or to find the menu that is referenced to, echo $cbMenuTreePath.

Wishing you a great end of weekend and Best Regards,

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

9 years 6 months ago #250219 by activha
Replied by activha on topic php warning on CB 2.0

At very first glance this seems due to a menu that you are referring to in a CB substitution to display that menu or its link in a given location, but that this menu doesn't exist anymore in CB 2.0. It could be the "About Community Builder" menu, if you didn't personalize that one, it gets removed by the upgrade.


That was exactly it !
A menu which added a connection and do not exist any longer in CB 2.0
Debugging with echo was great

Thanks a lot
Jean
The following user(s) said Thank You: nant

Please Log in to join the conversation.

9 years 6 months ago #250238 by beat
Replied by beat on topic php warning on CB 2.0

activha wrote:

At very first glance this seems due to a menu that you are referring to in a CB substitution to display that menu or its link in a given location, but that this menu doesn't exist anymore in CB 2.0. It could be the "About Community Builder" menu, if you didn't personalize that one, it gets removed by the upgrade.


That was exactly it !
A menu which added a connection and do not exist any longer in CB 2.0
Debugging with echo was great

Thanks a lot
Jean


Great!

And strange at the same time, CB 2.0 didn't remove the "Add connection" menu. But of course it's available only when it makes sense, as before... Are you sure you didn't have that warning since some time but the errors displays were suppressed on your hosted environment ? ;)

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

9 years 6 months ago #250244 by activha
Replied by activha on topic php warning on CB 2.0
Nope I did not see this warning on previous test environment before upgrading to CB 2.0

Anyway thanks for the hint :-)

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.226 seconds

Facebook Twitter LinkedIn