Skip to content

Commit

Permalink
ensure return is an array
Browse files Browse the repository at this point in the history
  • Loading branch information
onemoreangle committed Jun 22, 2023
1 parent 59b079d commit d4a50d6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/RDWOpenData/RDW.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ protected static function mergeOutput(array $data, array $output, string $endpoi
$data['as_' . $output_as['as_nummer'] . '_' . $item] = $value;
}
}
} else {
$data = array_merge($data, $output[0]) ?? [];
} else if(isset($output[0]) && is_array($output[0])) {
$data = array_merge($data, $output[0]);
}

return $data;
}

Expand Down

0 comments on commit d4a50d6

Please sign in to comment.