Title: Function array_combine () bug from Baw Manual Related Posts Plugin
Last modified: August 22, 2016

---

# Function array_combine () bug from Baw Manual Related Posts Plugin

 *  [Clemmo](https://wordpress.org/support/users/clemmo/)
 * (@clemmo)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/function-array_combine-bug-from-baw-manual-related-posts-plugin/)
 * 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/](https://wordpress.org/plugins/baw-manual-related-posts/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [Clemmo](https://wordpress.org/support/users/clemmo/)
 * (@clemmo)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/function-array_combine-bug-from-baw-manual-related-posts-plugin/#post-5419708)
 * 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
 *  [Borgtex](https://wordpress.org/support/users/borgtex/)
 * (@borgtex)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/function-array_combine-bug-from-baw-manual-related-posts-plugin/#post-5419711)
 * 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](https://wordpress.org/support/users/clemmo/)
 * (@clemmo)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/function-array_combine-bug-from-baw-manual-related-posts-plugin/#post-5419712)
 * 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](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.

 * ![](https://s.w.org/plugins/geopattern-icon/baw-manual-related-posts_fefdfd.svg)
 * [Manual Related Posts](https://wordpress.org/plugins/baw-manual-related-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/baw-manual-related-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/baw-manual-related-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/baw-manual-related-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/baw-manual-related-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/baw-manual-related-posts/reviews/)

## Tags

 * [from](https://wordpress.org/support/topic-tag/from/)
 * [function](https://wordpress.org/support/topic-tag/function/)
 * [manual](https://wordpress.org/support/topic-tag/manual/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)

 * 3 replies
 * 2 participants
 * Last reply from: [Clemmo](https://wordpress.org/support/users/clemmo/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/function-array_combine-bug-from-baw-manual-related-posts-plugin/#post-5419712)
 * Status: not resolved