Default destination type to inbound. Use is_array where it is required
This commit is contained in:
parent
74959e69c7
commit
10a4ceae65
|
|
@ -100,7 +100,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
//set the type
|
//set the type
|
||||||
$destination_type = '';
|
$destination_type = 'inbound';
|
||||||
if (!empty($_REQUEST['type'])) {
|
if (!empty($_REQUEST['type'])) {
|
||||||
switch ($_REQUEST['type']) {
|
switch ($_REQUEST['type']) {
|
||||||
case 'inbound': $destination_type = 'inbound'; break;
|
case 'inbound': $destination_type = 'inbound'; break;
|
||||||
|
|
|
||||||
|
|
@ -675,7 +675,7 @@ if (!class_exists('destinations')) {
|
||||||
$select_value = $row['select_value'][$destination_type];
|
$select_value = $row['select_value'][$destination_type];
|
||||||
$select_label = $row['select_label'];
|
$select_label = $row['select_label'];
|
||||||
foreach ($row['field'] as $key => $value) {
|
foreach ($row['field'] as $key => $value) {
|
||||||
if ($key == 'destination' and !empty($value)){
|
if (!empty($key) && $key == 'destination' && !empty($value) && is_array($value)){
|
||||||
if (!empty($value['type']) && $value['type'] == 'csv') {
|
if (!empty($value['type']) && $value['type'] == 'csv') {
|
||||||
$array = explode($value['delimiter'], $data[$key]);
|
$array = explode($value['delimiter'], $data[$key]);
|
||||||
$select_value = str_replace("\${destination}", $array[0], $select_value);
|
$select_value = str_replace("\${destination}", $array[0], $select_value);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue