Toolset Types
[Plugin: Types - Custom Fields and Custom Post Types Management] Invalid argument supplied for forea (2 posts)

  1. Cinamonas
    Posted 4 years ago #

    When creating or editing a custom type, I get this error:
    Warning: Invalid argument supplied for foreach() in includes/post-relationship.php on line 200

    As a temporary workaround, I've added a check just before foreach statement:
    if (!empty($relationships[$data['slug']]))

    So a working piece of code starting at line 200 looks like this:

    if (!empty($relationships[$data['slug']])) {
            foreach ($relationships[$data['slug']] as $post_type_has => $rel_data) {
                if (!isset($data['post_relationship']['has'][$post_type_has])) {


  2. Amir Helzer
    Plugin Author

    Posted 4 years ago #

    Thanks for the fix and for helping in the other thread. Would you mind getting us your DB dump, so that we can see what's leading to this condition?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Toolset Types
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic