Warning: Invalid argument supplied for foreach()
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’];
if somebody has an idea of how to solve the problem please write to me.
WEBSITE URL: https://dancecommunity.website/
- You must be logged in to reply to this topic.