EDIT: I think it's because initially the File Advanced field is supposed to have multiple files, that's why we have a foreach, but then why Meta Box is not returning an array of simply one item, if we have only one file within the File Advanced field?
I do not see the PHP error message on my local site. Please use the code below to print out the group value and share the value here. You can also export the field group to a JSON file and share it with me. I will take a look.
It seems that the issue is from WS Form since I'm using it to upload the files.
Message from Bricks team:
"The root cause of your issue is the upload form.
The form changed the way to store the file into non-array value.
(And that's the reason why you use the official Metabox Theme code isn't work)
In this example, I uploaded the files via the wp backend, with no error and you can see the var_dump is standard like Metabox Theme code, the file Id stored in an array of the field name key.
This post uploaded files via the form, triggering the fatal error.