Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Marius L. J.

    (@clorith)

    Hi,

    Thank you for the heads up, I just pushed 1.0.1 that fixes the warning output when files have yet to be attached in the post meta box!

    Hey there!,

    very handy plugin 😉

    When integrated in my wp template for all pages I have same problem:
    Warning: Invalid argument supplied for foreach() in /home/…/wp-content/plugins/post-attached-media-downloads/post-attached-media-downloads.php on line 378

    when there is an attachment to the page everything is normal, but the pages without attachments has error message 🙁

    I use WordPress version 3.9.1 and Post Attached Media Downloads 1.1

    Мy solution for Warning: Invalid argument supplied for foreach()
    in plugin file post-attached-media-downloads.php

    if (is_array($entries))
                           {
    			foreach( $entries AS $entry ) {

    Plugin Author Marius L. J.

    (@clorith)

    hi @a4nasko, sorry I didn’t see your post (ideally you should make a new post when one is marked as resolved as I only saw your reply by chance).

    I unfortunately didn’t see it before I released 1.2 today, but I pushed 1.2.1 as a hotfix just now (will probably show up shortly) which addresses the issue you were having, and will always return false for the get_downloads function if there are no downloads found for a post (was also needed for the shortcode implementation, so thanks for spotting that!)

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Returns error’ is closed to new replies.