Hi guys!
I was using the example that you wrote on the gform_admin_notificacion_attachments documentation (http://www.gravityhelp.com/documentation/page/Gform_admin_notification_attachments). It works great! but after a few tests I realize something:
If you have (for example) 5 file upload fields, and you only attach 2 (the 5 file fields are marked as not required... so, is ok to attach only 2), no one file will be attached!
The problem is that in the example, $attachments will be returned as an array of 5 indexes, indexes 0 and 1 will have the path of each image, but indexes 2, 3 and 4 will be isset but empty. That seems to cause that no one attachment is sent.
To fix this, I made a little change to the function:
Now the returned array has only the 2 indexes with images, and the images are sent to the email.
I hope this would be helpful to somebody as it was for me.