Custom Fields
Re-Envisioned
Support General Fields not showing: Warning: Invalid argument supplied for foreach()

This topic contains 6 replies, has 2 voices, and was last updated by  Ale 5 months ago.

  • Creator
    Topic
  • #13812
    Resolved
    Ale
    Participant

    Hello Anh,

    Today after the update of MB I start getting this messages randomly in some fields (image_advanced) please check how it currently is: https://www.colorale.com/work/dji-com/

    If I re-upload the images some are fixed but after I save I get the same error in the fixed one or in other fields.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #13813

    Anh Tran
    Keymaster

    Hi Ale, can you post the code you use on those locations?

    #13817

    Ale
    Participant

    Here’s the relevant part of the code.

    the line with Warning: Invalid argument supplied for foreach() is the one with:

    foreach ( $image_fields as $object_img ) {

    #13840

    Anh Tran
    Keymaster

    Hi Ale, can you var_dump( $image_fields ) to see what values it has?

    #13842

    Ale
    Participant

    I re-uploaded one image and then that one and others start showing up, this is what I get with the images that are being displayed: array(1) { [0]=> string(4) "1227" }

    I’ve tried to re upload all images and the message Warning: Invalid argument supplied for foreach() randomly shows in some images every time I update.

    🤷🏻‍♂️

    #13863

    Anh Tran
    Keymaster

    Can you send me a temporary admin account to check and fix that?

    #13865

    Ale
    Participant

    Email sent, thanks.

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

You must be logged in to reply to this topic.