Skip to content

Commit

Permalink
Fix StructuredPostalAddress regression
Browse files Browse the repository at this point in the history
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
1 parent 62e5338 commit b10d390
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit b10d390

Please sign in to comment.