@@ -121,13 +121,13 @@ public function addPerson($finalData)
121121 }
122122 }
123123
124- if (! empty ($ this ->integrationDetails ->selectedCompany )) {
124+ if (isset ($ this ->integrationDetails ->selectedOwner )) {
125125 $ requestParams ['assignee_id ' ] = (int ) ($ this ->integrationDetails ->selectedOwner );
126126 }
127- if (! empty ($ this ->integrationDetails ->selectedCompany )) {
127+ if (isset ($ this ->integrationDetails ->selectedCompany )) {
128128 $ requestParams ['company_id ' ] = (int ) ($ this ->integrationDetails ->selectedCompany );
129129 }
130- if (! empty ($ this ->integrationDetails ->selectedTags )) {
130+ if (isset ($ this ->integrationDetails ->selectedTags )) {
131131 $ requestParams ['tags ' ] = explode (', ' , $ this ->integrationDetails ->selectedTags );
132132 }
133133
@@ -161,10 +161,10 @@ public function addOpportunity($finalData)
161161 }
162162 }
163163
164- if (! empty ($ this ->integrationDetails ->selectedCRMPeople )) {
164+ if (isset ($ this ->integrationDetails ->selectedCRMPeople )) {
165165 $ requestParams ['primary_contact_id ' ] = (int ) ($ this ->integrationDetails ->selectedCRMPeople );
166166 }
167- if (! empty ($ this ->integrationDetails ->selectedCRMPipelines )) {
167+ if (isset ($ this ->integrationDetails ->selectedCRMPipelines )) {
168168 $ requestParams ['pipeline_id ' ] = (int ) ($ this ->integrationDetails ->selectedCRMPipelines );
169169 }
170170 if ($ this ->integrationDetails ->actions ->owner ) {
@@ -173,7 +173,7 @@ public function addOpportunity($finalData)
173173 if ($ this ->integrationDetails ->actions ->company ) {
174174 $ requestParams ['company_id ' ] = (int ) ($ this ->integrationDetails ->selectedCompany );
175175 }
176- if (! empty ($ this ->integrationDetails ->actions ->pipelineStage )) {
176+ if (isset ($ this ->integrationDetails ->actions ->pipelineStage )) {
177177 $ requestParams ['pipeline_stage_id ' ] = (int ) ($ this ->integrationDetails ->selectedPipelineStage );
178178 }
179179
@@ -224,11 +224,11 @@ public function generateReqDataFromFieldMap($data, $fieldMap)
224224 {
225225 $ dataFinal = [];
226226 foreach ($ fieldMap as $ value ) {
227- $ triggerValue = $ value ->formField === 'custom ' && ! empty ($ value ->customValue )
227+ $ triggerValue = $ value ->formField === 'custom ' && isset ($ value ->customValue )
228228 ? Common::replaceFieldWithValue ($ value ->customValue , $ data )
229229 : $ value ->formField ;
230230
231- $ actionValue = $ value ->coppercrmFormField === 'customFieldKey ' && ! empty ($ value ->customFieldKey )
231+ $ actionValue = $ value ->coppercrmFormField === 'customFieldKey ' && isset ($ value ->customFieldKey )
232232 ? Common::replaceFieldWithValue ($ value ->customFieldKey , $ data )
233233 : $ value ->coppercrmFormField ;
234234
0 commit comments