fix: validation of the Email action on Workflows  
fix: validation of the Email action on Workflows  

 When the Workflow action is 'email' and it is related to the Bean processed, the field related might be empty. 

When this happens the workflows fails with a fatal error due to $linkedBean->emailAddress->getPrimaryAddress  call.   All the scheduled workflows won't run after a failure like this.

 $linkedBeans is present but with an empty array so this PR will check if the value is not empty before trying to access its properties.
cumanacr/SuiteCRM,lionixevolve/SuiteCRM,daniel-samson/SuiteCRM,JanSiero/SuiteCRM,JanSiero/SuiteCRM,Dillon-Brown/SuiteCRM,JimMackin/SuiteCRM,gcoop-libre/SuiteCRM,samus-aran/SuiteCRM,MikeyJC/SuiteCRM,salesagility/SuiteCRM,JimMackin/SuiteCRM,cumanacr/SuiteCRM,horus68/SuiteCRM-Horus68,samus-aran/SuiteCRM,cumanacr/SuiteCRM,ChangezKhan/SuiteCRM,pgorod/SuiteCRM,ChangezKhan/SuiteCRM,pgorod/SuiteCRM,gcoop-libre/SuiteCRM,gody01/SuiteCRM,dfstrauss/SuiteCRM,pribeiro42/SuiteCRM,gody01/SuiteCRM,lionixevolve/LionixCRM,samus-aran/SuiteCRM,lionixevolve/LionixCRM,lionixevolve/SuiteCRM,MikeyJC/SuiteCRM,willrennie/SuiteCRM,pgorod/SuiteCRM,horus68/SuiteCRM-Horus68,JanSiero/SuiteCRM,MikeyJC/SuiteCRM,salesagility-davidthomson/SuiteCRM,gody01/SuiteCRM,salesagility-davidthomson/SuiteCRM,MikeyJC/SuiteCRM,pribeiro42/SuiteCRM,Dillon-Brown/SuiteCRM,pribeiro42/SuiteCRM,Dillon-Brown/SuiteCRM,lionixevolve/LionixCRM,lionixevolve/LionixCRM,dfstrauss/SuiteCRM,pgorod/SuiteCRM,JimMackin/SuiteCRM,daniel-samson/SuiteCRM,willrennie/SuiteCRM,willrennie/SuiteCRM,salesagility/SuiteCRM,cumanacr/SuiteCRM,JanSiero/SuiteCRM,daniel-samson/SuiteCRM,lionixevolve/LionixCRM,horus68/SuiteCRM-Horus68,JimMackin/SuiteCRM,horus68/SuiteCRM-Horus68,samus-aran/SuiteCRM,dfstrauss/SuiteCRM,lionixevolve/LionixCRM,daniel-samson/SuiteCRM,gody01/SuiteCRM,ChangezKhan/SuiteCRM,Dillon-Brown/SuiteCRM,salesagility-davidthomson/SuiteCRM,lionixevolve/SuiteCRM,willrennie/SuiteCRM,gcoop-libre/SuiteCRM,ChangezKhan/SuiteCRM,gcoop-libre/SuiteCRM,salesagility/SuiteCRM,salesagility-davidthomson/SuiteCRM,lionixevolve/SuiteCRM,pribeiro42/SuiteCRM,dfstrauss/SuiteCRM,salesagility/SuiteCRM