fix php error: foreach failed if no any attachments
fix php error: foreach failed if no any attachments

lionixevolve/LionixCRM,pribeiro42/SuiteCRM,daniel-samson/SuiteCRM,MikeyJC/SuiteCRM,horus68/SuiteCRM,gcoop-libre/SuiteCRM,horus68/SuiteCRM-Horus68,JanSiero/SuiteCRM,lionixevolve/SuiteCRM,horus68/SuiteCRM,Dillon-Brown/SuiteCRM,adamjakab/SuiteCRM,horus68/SuiteCRM,leonardobarrientosc/SuiteCRM,adamjakab/SuiteCRM,noelhunter/SuiteCRM,salesagility/SuiteCRM,lionixevolve/LionixCRM,salesagility-davidthomson/SuiteCRM,salesagility/SuiteCRM,willrennie/SuiteCRM,Dillon-Brown/SuiteCRM,dfstrauss/SuiteCRM,MikeyJC/SuiteCRM,gcoop-libre/SuiteCRM,dfstrauss/SuiteCRM,cumanacr/SuiteCRM,samus-aran/SuiteCRM,gcoop-libre/SuiteCRM,lionixevolve/SuiteCRM,daniel-samson/SuiteCRM,ChangezKhan/SuiteCRM,Dillon-Brown/SuiteCRM,pribeiro42/SuiteCRM,lionixevolve/SuiteCRM,lionixevolve/LionixCRM,lionixevolve/LionixCRM,gody01/SuiteCRM,adamjakab/SuiteCRM,samus-aran/SuiteCRM,daniel-samson/SuiteCRM,daniel-samson/SuiteCRM,ChangezKhan/SuiteCRM,JanSiero/SuiteCRM,JimMackin/SuiteCRM,shogunpol/SuiteCRM,leonardobarrientosc/SuiteCRM,JimMackin/SuiteCRM,gody01/SuiteCRM,salesagility/SuiteCRM,leonardobarrientosc/SuiteCRM,MikeyJC/SuiteCRM,pgorod/SuiteCRM,salesagility-davidthomson/SuiteCRM,noelhunter/SuiteCRM,pribeiro42/SuiteCRM,salesagility/SuiteCRM,samus-aran/SuiteCRM,JanSiero/SuiteCRM,horus68/SuiteCRM-Horus68,ChangezKhan/SuiteCRM,gcoop-libre/SuiteCRM,ChangezKhan/SuiteCRM,shogunpol/SuiteCRM,shogunpol/SuiteCRM,lionixevolve/LionixCRM,noelhunter/SuiteCRM,pgorod/SuiteCRM,JanSiero/SuiteCRM,gody01/SuiteCRM,MikeyJC/SuiteCRM,dfstrauss/SuiteCRM,willrennie/SuiteCRM,willrennie/SuiteCRM,lionixevolve/LionixCRM,noelhunter/SuiteCRM,gody01/SuiteCRM,salesagility-davidthomson/SuiteCRM,horus68/SuiteCRM-Horus68,pgorod/SuiteCRM,shogunpol/SuiteCRM,pgorod/SuiteCRM,pribeiro42/SuiteCRM,JimMackin/SuiteCRM,cumanacr/SuiteCRM,adamjakab/SuiteCRM,dfstrauss/SuiteCRM,horus68/SuiteCRM-Horus68,leonardobarrientosc/SuiteCRM,willrennie/SuiteCRM,JimMackin/SuiteCRM,lionixevolve/SuiteCRM,cumanacr/SuiteCRM,samus-aran/SuiteCRM,cumanacr/SuiteCRM,salesagility-davidthomson/SuiteCRM,Dillon-Brown/SuiteCRM