Skip to content

Commit

Permalink
Fix array inputs for addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Nov 3, 2014
1 parent 690cab3 commit c2bf3b3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions imp/lib/Ajax/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,15 +377,15 @@ public function getAddrFields()
'map' => false
);

if (strlen($data)) {
if (strlen($data_ac)) {
$tmp['map'] = true;
foreach (json_decode($data_ac, true) as $val2) {
$tmp['addr'][$val2[1]] = $val2[0];
}
} else {
$tmp['addr'][] = $data;
if (strlen($data_ac)) {
$tmp['map'] = true;
foreach (json_decode($data_ac, true) as $val2) {
$tmp['addr'][$val2[1]] = $val2[0];
}
} else {
$tmp['addr'] += is_array($data)
? array_values($data)
: array($data);
}

$out[$val] = $tmp;
Expand Down

0 comments on commit c2bf3b3

Please sign in to comment.