Got it :
wp_update_post( array( 'ID' => $attach->ID, 'post_parent' => 0) );
to
wp_update_post( array( 'ID' => $postID 'post_parent' => 0) );
Got it :
wp_update_post( array( 'ID' => $attach->ID, 'post_parent' => 0) );
to
wp_update_post( array( 'ID' => $postID 'post_parent' => 0) );