WordPress.org

Ready to get started?Download WordPress

Forums

Network Shared Posts
A bug, and a fix. (2 posts)

  1. applehat
    Member
    Posted 1 year ago #

    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/

  2. Code Ext
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for posting this issue. I'm gonna fix it.
    What do you mean 're-structure'? What do you think should be done?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.