FIX : test on link type

This commit is contained in:
Gauthier PC portable 024 2021-04-19 09:17:33 +02:00
parent ff8aae1209
commit 8c428081ab

View File

@ -638,11 +638,11 @@ class AdvanceTargetingMailing extends CommonObject
} }
} elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'boolean') { } elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'boolean') {
if ($arrayquery['options_'.$key]!=''){ if ($arrayquery['options_'.$key]!=''){
$sqlwhere[]= " (te.".$key." = ".((int)$arrayquery['options_'.$key]).")"; $sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key].")";
} }
} elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'link') { } elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'link') {
if ($arrayquery['options_'.$key] > 0){ if ($arrayquery['options_'.$key] > 0){
$sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key].")"; $sqlwhere[]= " (te.".$key." = ".((int)$arrayquery['options_'.$key]).")";
} }
} else { } else {
if (is_array($arrayquery['options_'.$key])) { if (is_array($arrayquery['options_'.$key])) {