Skip to content

Commit

Permalink
Merge pull request #11 from Lotuashvili/patch-1
Browse files Browse the repository at this point in the history
Check if exploded array contains second item
  • Loading branch information
sandrodz authored May 30, 2019
2 parents c72d96d + 9eeb02f commit d36806b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/WeAreDe/TbcPay/TbcPayProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ private function parse_result($string)
$result = array();
foreach ($array1 as $key => $value) {
$array2 = explode(':', $value);
$result[ $array2[0] ] = trim($array2[1]);
if (!empty($array2[1])) {
$result[ $array2[0] ] = trim($array2[1]);
}
}

return $result;
Expand Down

0 comments on commit d36806b

Please sign in to comment.