Title: [Plugin: Network Shared Posts] A bug, and a fix.
Last modified: August 20, 2016

---

# [Plugin: Network Shared Posts] A bug, and a fix.

 *  [applehat](https://wordpress.org/support/users/applehat/)
 * (@applehat)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-network-shared-posts-a-bug-and-a-fix/)
 * Hey, I found a bug.
 * If you dont define a taxonomy, you will get an error in your SQL statement.
 * In network-shared-posts.php:
 * on line ~149
    `$ids = ' AND ('. substr($ids,0,strlen($ids)-2).')';`
 * If $ids is not set (no taxonomy filter), you get “AND ()” in the SQL.
 * A simple fix is to just wrap it like this:
 * `if ($ids) { $ids = ' AND ('. substr($ids,0,strlen($ids)-2).')'; }`
 * And that fixes the issue.
 * This whole code block should really use a re-structure, but this works.
 * [http://wordpress.org/extend/plugins/network-shared-posts/](http://wordpress.org/extend/plugins/network-shared-posts/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Code Ext](https://wordpress.org/support/users/codeext/)
 * (@codeext)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-network-shared-posts-a-bug-and-a-fix/#post-2947803)
 * Thanks for posting this issue. I’m gonna fix it.
    What do you mean ‘re-structure’?
   What do you think should be done?

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Network Shared Posts] A bug, and a fix.’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/network-shared-posts_9b9cbd.svg)
 * [Network Shared Posts](https://wordpress.org/plugins/network-shared-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/network-shared-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/network-shared-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/network-shared-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/network-shared-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/network-shared-posts/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Code Ext](https://wordpress.org/support/users/codeext/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-network-shared-posts-a-bug-and-a-fix/#post-2947803)
 * Status: not resolved