Skip to:
Content

BuddyPress.org

Opened 6 years ago

Closed 6 years ago

#7629 closed defect (bug) (fixed)

Nouveau: Warning: array_values() expects parameter 1 to be array, boolean given

Reported by: keshabee's profile keshabee Owned by: djpaul's profile djpaul
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.9.0
Component: Templates Keywords: needs-patch
Cc: boluosisanya@…

Description

I notices in one of the profile tab i usually see a display .:.
Warning: array_values() expects parameter 1 to be array, boolean given
wp-content/plugins/next-template-packs-master/bp-templates/bp-nouveau/includes/template-tags.php on line 756
(The warning display's in the front end )
I check the line file with the code:
$bp_nouveau->sorted_nav = array_values( $nav );

It occurs basically on a 2.9.2 buddypress install

Change History (12)

#1 @hnla
6 years ago

  • Component changed from Core to Templates
  • Summary changed from Warning: array_values() expects parameter 1 to be array, boolean given to Nouveau: Warning: array_values() expects parameter 1 to be array, boolean given

@keshabee Can you provide the exact screen you're seeing this warning on? Currently I can't replicate this warning, checking through the function dumping the values doesn't seem to find an instance where the var(s) aren't set as arrays.

#2 @keshabee
6 years ago

  • Cc boluosisanya@… added

Sorry about the late reply;
I notice this error statement in this link part of the web (https://www.boundmix.com/members/boluwatife_osisanya/articles/)
If you wish to replicate an error on your side to test on the reason it shown on the article tab:
Am using this plugin to (Social Articles By Broobe)
(https://wordpress.org/plugins/social-articles/)

#3 @keshabee
6 years ago

Edit: Removed rendering of includes/template-tags.php.

Thanks @keshabee removed as this is a little too much to display and have the file and function locally.

Last edited 6 years ago by hnla (previous) (diff)

#4 follow-up: @hnla
6 years ago

@keshabee Thanks for the site link which helps id the issue, which looks to be on creation of new user screens, likely without subnavs links array, we'll look at replicating and fixing in due course.

One question is this issue still present without the plugin you mentioned above? I'm reluctant to load up third party plugins, is the plugin creating the new screen?

#5 in reply to: ↑ 4 @keshabee
6 years ago

Thank you very much for your quick response,
The issue does not seem to persist without the plugin. As it only appears on that article tab section when the plugin is active.

#6 @keshabee
6 years ago

I do have a question is there any way of hiding this message from showing in the front end page without deactivating the plugin till the fix comes up.

#7 @hnla
6 years ago

@keshabee Turn of php error notices and/or wp_debug constant set to false if true in your wp-config.php file.

Two things to bear in mind though:
1/ Nouveau is still not officially released as such so to be regarded as beta ? 2 ( close to RC )
2/ warning / error notices should be turned off in a production environment.

However I'm sure you're just testing at this stage and know this :)

#8 @keshabee
6 years ago

Yes I do, thank you very much

#9 @DJPaul
6 years ago

  • Milestone changed from Awaiting Review to 3.0

#10 @DJPaul
6 years ago

Right, this occurs with this plugin, on the URL given, for anonymous users.

#11 @DJPaul
6 years ago

likely without subnavs links array

exactly this

#12 @djpaul
6 years ago

  • Owner set to djpaul
  • Resolution set to fixed
  • Status changed from new to closed

In 11797:

Templates, Nouveau: fix PHP Notice when secondary navigation is not set.

For example, as a anonymous users with the third-party plugin, "Social Articles".

Fixes #7629

Props hnla

Note: See TracTickets for help on using tickets.