• Hello,

    This error message is appearing on the top of my posts:

    “Warning: array_combine() [function.array-combine]: Both parameters should have at least 1 element in /home/clemmoar/www/wp-content/plugins/baw-manual-related-posts/inc/bothend-noajax.inc.php on line 115”

    It seems the problem comes from Baw Manual Related Posts Plugin. Does anyone knows a simple way to fix this? I deactivated the plugin and the message has gone for now, but I love the plugin and would like to reactivate as soon as I can fix the bug!

    Thank you so much for your help 🙂

    Clemmo

    https://wordpress.org/plugins/baw-manual-related-posts/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Clemmo

    (@clemmo)

    Anyone to help me with this bug?
    I am still struggling with it, I have done lots of researches and I can’t figure it out!

    BAW Manual Related posts is the best related posts plugin I have ever used, and it makes me so frustrated not to be able to use it again!

    Thank you WordPress community :)))

    Clemmo

    You’ll have to edit two files in /wp-content/plugins/baw-manual-related-posts/inc/

    bothend-noajax.inc.php

    comment or delete this block of code (lines 111 to 116):

    if ( isset( $sitepress ) && null === $langs ) {
    $langs = $sitepress->get_languages( “en’ AND active=’1”);
    $codes = wp_list_pluck( $langs, ‘code’ );
    $langs = wp_list_pluck( $langs, ‘default_locale’ );
    $langs = array_combine( $codes, $langs );
    }

    setting_fields.inc.php

    comment or remove this code (lines 39 to 43)

    if ( isset( $sitepress ) ) {
    $langs = $sitepress->get_languages( “en’ AND active=’1” );
    } else {
    $langs = array( array( ‘default_locale’=>get_locale() ) );
    }

    an put this one instead:
    $langs = array( array( ‘default_locale’=>get_locale() ) );

    Don’t worry about the deleted code. It has an error in the query (maybe it worked in previous wordpress versions) so it always returns an empty array.

    Thread Starter Clemmo

    (@clemmo)

    Hello Borgtex!

    Thank you so much for your answer. I am relieved to know the error comes from the plugin and not from something I did! It appeared after WordPress 4 big update, you are right.

    I tried editing the plugin code, and there is no change. You can look at a blog page here, it will show the same error code at the top of the post:
    http://clemmoaroundtheworld.com/oreo-smoothie-by-clemmo

    Should I wait and see if the changes appear after a while? I already deleted the cache.

    Something called my attention though: in the editing section of the plugin, it says”inactive“. Is that something that could explain why changes are not being taken in account? How can I switch to “active“?—->

    Edit Plugins
    Editing baw-manual-related-posts/inc/bothend-noajax.inc.php (inactive)

    Thank you so much for your help!

    Clemmo

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Function array_combine () bug from Baw Manual Related Posts Plugin’ is closed to new replies.