Skip to content

Wordpress support thread has fix for #5

@mitchell360

Description

@mitchell360

Check out http://wordpress.org/support/topic/class-attachments-not-found?replies=19#post-3551177

I found a bug and suggested a fix for class.attachments.php (line 970-ish).

function get_attachments( $instance = '', $post_id = null )
{
global $post;

        if (is_null($post_id))
        {
            if( is_null( $post_id ) && is_object( $post ) && isset( $post->ID ) )
            {
                $post_id = $post->ID;
            }
            elseif( isset( $_GET['post'] ) )
            {
                $post_id = intval( $_GET['post'] );
            }
            else
            {
                // no post ID, nothing to do...
                return;
            }
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions