Opened 6 years ago
Closed 6 years ago
#7971 closed defect (bug) (no action required)
Warning: Invalid argument supplied for foreach() in /home3/danceco/public_html/wp-content/plugins/bp-profile-search/bps-external.php on line 257
Reported by: | carolina1507 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Core | Keywords: | |
Cc: |
Description
Hy you all,
So I am writing today because I need your help.
I am creating a website using kleo theme, buddy press and geodirectory. Everything was working totally fine until 2 days ago when I updated buddy press plugin 3.2. Since then in every window of the website it displays this message : Warning: Invalid argument supplied for foreach() in /home3/danceco/public_html/wp-content/plugins/bp-profile-search/bps-external.php on line 257
Maybe for most of you it would be an easy problem to resolve but for me (being not an expert) it is really hard and I cannot understand what I should change in the code of that line.
I write here the code from line 249:
`$f->format = ‘text’;
$terms = get_terms (array (‘taxonomy’ => $taxonomy, ‘hide_empty’ => false));
foreach ($terms as $term)
$f->options[$term->term_id] = $term->name;
if ($taxonomy == ‘bp_member_type’)
{
$terms = bp_get_member_types (array (), ‘objects’);
foreach ($f->options as $k => $option)
{
if (isset ($terms[$option]))
$f->options[$k] = $terms[$option]->labels[‘singular_name’];
else
unset ($f->options[$k]);
}
if somebody has an idea of how to solve the problem please write to me.
Thanks.
WEBSITE URL: https://dancecommunity.website/
Change History (3)
#3
@
6 years ago
- Keywords reporter-feedback removed
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
Going to close this as this isn't a bug in core.
Feel free to continue replying in the user's support thread here - https://buddypress.org/support/topic/warning-invalid-argument-supplied-for-foreach-2/
Hi carolina1507,
Thank you for your report!
That warning comes from the BP Profile Search plugin. I think I fixed the issue, please try downloading a fresh copy of BP Profile Search. Can you confirm that the warnings are gone?