Skip to:
Content
Pages
Categories
Search
Top
Bottom

Warning: Invalid argument supplied for foreach()

  • @carolina1507

    Participant

    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/

Viewing 4 replies - 1 through 4 (of 4 total)
  • @r-a-y

    Keymaster

    Notify the plugin developers of bp-profile-search and let them know of the problem.

    If they find that the problem ends up coming from BuddyPress, tell them to post a ticket at https://buddypress.trac.wordpress.org

    @carolina1507

    Participant

    thank you so much I will do it immediately !!

    @r-a-y

    Keymaster

    It looks like you didn’t post a support thread on the bp-profile-search forum:
    https://wordpress.org/support/plugin/bp-profile-search

    Please create a thread over there first before creating a ticket on Trac as you did here.

    @dontdream

    Participant

    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?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar