Title: Problem in recent-posts/blocks.php
Last modified: May 25, 2021

---

# Problem in recent-posts/blocks.php

 *  Resolved [jeremy.brookes](https://wordpress.org/support/users/jeremybrookes/)
 * (@jeremybrookes)
 * [5 years ago](https://wordpress.org/support/topic/problem-in-recent-posts-blocks-php/)
 * In backend in WooCommerce, when editing a product I’m getting an error:
    **Warning**:
   Invalid argument supplied for foreach() in <<my server path>>**/wp-content/plugins/
   advanced-gutenberg/assets/blocks/recent-posts/block.php** on line **897**
 * I tried to do a little debugging and it seems like at line 895 $terms sometimes
   returns an array and others it returns a bool(false) which throws the foreach
   loop.

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

 *  Plugin Author [htmgarcia](https://wordpress.org/support/users/htmgarcia/)
 * (@htmgarcia)
 * [5 years ago](https://wordpress.org/support/topic/problem-in-recent-posts-blocks-php/#post-14481921)
 * Hi [@jeremybrookes](https://wordpress.org/support/users/jeremybrookes/),
    thanks
   for reporting this issue. We’re already working on a fix, however having more
   details will speed up the process.
 * Would you mind sharing step by step details to reach the issue? Please do it 
   through our support page: [https://publishpress.com/publishpress-support/](https://publishpress.com/publishpress-support/)–
   Include the info from Tools > Site health > Info. Click “Copy site info to clipboard”
   and paste as part of your message.
 * Don’t forget to include the URL of this forum topic as reference.
 *  [andreeapomirleanu](https://wordpress.org/support/users/andreeapomirleanu/)
 * (@andreeapomirleanu)
 * [5 years ago](https://wordpress.org/support/topic/problem-in-recent-posts-blocks-php/#post-14503999)
 * Hi [@htmgarcia](https://wordpress.org/support/users/htmgarcia/)
 * I’m having the same issue(same block, same line), but my site is using Easy Digital
   Downloads, not WooCommerce. The error does not appear when I try to edit Posts
   or other custom post types, only on the Downloads (the EDD custom post type).
 * Should I also report it through the support link above? Would Info from a localhost
   environment be good?
 * Thank you!
 *  Plugin Author [htmgarcia](https://wordpress.org/support/users/htmgarcia/)
 * (@htmgarcia)
 * [5 years ago](https://wordpress.org/support/topic/problem-in-recent-posts-blocks-php/#post-14504028)
 * [@andreeapomirleanu](https://wordpress.org/support/users/andreeapomirleanu/) 
   please send us a message through our support page: [https://publishpress.com/publishpress-support/](https://publishpress.com/publishpress-support/)–
   We’ll send you a package that potentially will fix this issue. We need some feedback
   before doing the release.
 * Don’t forget to include the URL of this forum topic as reference.
 *  Plugin Author [htmgarcia](https://wordpress.org/support/users/htmgarcia/)
 * (@htmgarcia)
 * [5 years ago](https://wordpress.org/support/topic/problem-in-recent-posts-blocks-php/#post-14504328)
 * 2.7.1 version fixes this issue.
 *  [andreeapomirleanu](https://wordpress.org/support/users/andreeapomirleanu/)
 * (@andreeapomirleanu)
 * [5 years ago](https://wordpress.org/support/topic/problem-in-recent-posts-blocks-php/#post-14511921)
 * Hey [@htmgarcia](https://wordpress.org/support/users/htmgarcia/)
 * Awesome, I just updated to 2.7.1 and the problem is fixed. Thanks for looking
   into this so fast!
 *  Plugin Author [htmgarcia](https://wordpress.org/support/users/htmgarcia/)
 * (@htmgarcia)
 * [5 years ago](https://wordpress.org/support/topic/problem-in-recent-posts-blocks-php/#post-14512500)
 * Thanks for your feedback, [@andreeapomirleanu](https://wordpress.org/support/users/andreeapomirleanu/)!
   Please consider leaving a review.
 * Regards

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

The topic ‘Problem in recent-posts/blocks.php’ is closed to new replies.

 * ![](https://ps.w.org/advanced-gutenberg/assets/icon-256x256.png?rev=3393761)
 * [PublishPress Blocks - Block Controls, Block Visibility, Block Permissions](https://wordpress.org/plugins/advanced-gutenberg/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-gutenberg/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-gutenberg/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-gutenberg/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-gutenberg/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-gutenberg/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [htmgarcia](https://wordpress.org/support/users/htmgarcia/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/problem-in-recent-posts-blocks-php/#post-14512500)
 * Status: resolved