• Resolved krut1

    (@krut1)


    Hey people,

    could you please fix it:

    PHP Warning: Invalid argument supplied for foreach() in /wordpress/wp-content/plugins/woo-variation-gallery/includes/class-woo-variation-gallery-export-import.php on line 42

    You have this part of code:

    $gallery_images = get_post_meta( $product_id, 'woo_variation_gallery_images', true );
    $images         = array();
    
    foreach ( $gallery_images as $image_id ) {
      ...
    }

    But get_post_meta returns not always an array. It can be bool too ??

    Therefore foreach (false as $image_id) => Warning!

    • This topic was modified 4 years, 5 months ago by krut1.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Export: Invalid argument supplied for foreach’ is closed to new replies.