• Hi Andrea,

    you have good plugin and I want use it, but it some broken (I think its happen after new WP or BP update).

    My version: BP Version 2.1.1 and WP 4.1.1

    The problem is in function unserialize ($meta[‘bps_options’][0]). Because now the $meta[‘bps_options’] is array not string. But with wrong structure, so it need some reorganize and add to return in correct form.

    Thanks.

    https://www.ads-software.com/plugins/bp-profile-search/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Andrea Tarantini

    (@dontdream)

    Hi ChocoTUx,

    Which specific problems are you experiencing? I need more details, to be able to reproduce the issue on my site.

    Thread Starter ChocoTUx

    (@chocotux)

    K, np

    When I try add new field (in User->Profile Search) it stop on this warnings

    Warning: unserialize() expects parameter 1 to be string, array given in address\wp-content\plugins\bp-profile-search-master\bps-main.php on line 58

    and
    Warning: Invalid argument supplied for foreach() in address\wp-content\plugins\bp-profile-search-master\bps-functions.php on line 162

    When I do some var_dump, I′ll get this arrays:

    near 56lines on bps-main – var_dump($meta[‘bps_options’]);
    show this:
    array(1) { [0]=> array(10) { [“field_name”]=> array(1) { [0]=> string(1) “1” } [“field_label”]=> array(1) { [0]=> string(4) “asdf” } [“field_desc”]=> array(1) { [0]=> string(4) “asdf” } [“field_range”]=> array(1) { [0]=> NULL } [“directory”]=> string(3) “Yes” [“header”]=> string(0) “” [“toggle”]=> string(7) “Enabled” [“button”]=> string(0) “” [“method”]=> string(4) “POST” [“searchmode”]=> string(4) “LIKE” } }

    but this thing you send to function unserialize which is expected string.

    thx

    Plugin Author Andrea Tarantini

    (@dontdream)

    Still not able to reproduce the issue. Two questions:

    1. Are you using a beta version of WordPress? I’m not aware of a 4.1.1 version.

    2. Could you delete the ‘unserialize’ word from line 58 and try again?

    Thread Starter ChocoTUx

    (@chocotux)

    I install wp few days ago (and probably not shutdown auto. update). My version: You are using a development version (4.1-alpha-30308).

    I tryed delete unserialize function, but it have different structure, and next function is confused about it. I start make some foreach where make correct structure and if I had some errors in my logic i decided report error to you (but if you cant simulate this error, i can try finish my “hot-fix” and share it. (but probably on next thuesdeay).

    Plugin Author Andrea Tarantini

    (@dontdream)

    I think it’s not advisable to build a project on an alpha version, as probably what you found is simply a bug of the alpha version itself.

    Anyway, please keep me updated. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Cant update new field’ is closed to new replies.