Skip to content
This repository was archived by the owner on Nov 7, 2021. It is now read-only.

Fix StructuredPostalAddress regression #25

Merged
merged 1 commit into from
Mar 25, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix StructuredPostalAddress regression
The test is inversed, so the street and the buillding number are not longer added to the XML!
  • Loading branch information
sdespont authored Mar 23, 2018
commit b10d3907a2f622f58611c8f4fcf4cc0c6ceecb53
4 changes: 2 additions & 2 deletions src/Z38/SwissPayment/StructuredPostalAddress.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ public function asDom(\DOMDocument $doc)
{
$root = $doc->createElement('PstlAdr');

if (!strlen($this->street)) {
if (strlen($this->street)) {
$root->appendChild($doc->createElement('StrtNm', $this->street));
}
if (!strlen($this->buildingNo)) {
if (strlen($this->buildingNo)) {
$root->appendChild($doc->createElement('BldgNb', $this->buildingNo));
}
$root->appendChild($doc->createElement('PstCd', $this->postCode));
Expand Down