Skip to content

Commit

Permalink
bug fixes: LocationMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
pavarnos committed Sep 24, 2018
1 parent 5b960ca commit 8068ec8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Threema/MsgApi/Encryptor/AbstractEncryptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ final public function decryptMessage($box, $recipientPrivateKey, $senderPublicKe
throw new BadMessageException('invalid latitude and longitude');
}
array_shift($lines); // to get the address parts
return new LocationMessage($points[0], $points[1], intval($points[3] ?? 0), $lines);
return new LocationMessage($points[0], $points[1], intval($points[2] ?? 0), $lines);

default:
throw new UnsupportedMessageTypeException();
Expand Down
2 changes: 1 addition & 1 deletion src/Threema/MsgApi/Message/LocationMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function __construct(string $latitude, string $longitude, int $accuracy =
$this->latitude = $latitude;
$this->longitude = $longitude;
$this->accuracy = $accuracy;
$this->address = $address;
$this->address = array_filter($address);
}

/**
Expand Down

0 comments on commit 8068ec8

Please sign in to comment.