Support » Plugin: Slideshow Gallery » [Plugin: Slideshow Gallery] BUGFIX: Exclusions not working when loading images attached to a post

  • timnovinger

    (@timnovinger)


    On line 201 of slideshow-gallery.php the in_array() statement is looking for the $a iterator variable in the exclusion array instead of the $id. It seems to be searching for the array key instead of the array value. This fails silently on my server running PHP 5.3.5 and WP 3.4.1.

    I’m not sure what the $a iterator variable is doing in this instance – it looks completely unnecessary so it is possible that you may be able to simply rip it out.

    If lines 201 − 203 are changed to the code below it works fine.

    if (in_array($id, $exclude)) {
      unset($attachments[$id]);
    }

    http://wordpress.org/extend/plugins/slideshow-gallery/

  • The topic ‘[Plugin: Slideshow Gallery] BUGFIX: Exclusions not working when loading images attached to a post’ is closed to new replies.