Skip to content

Commit

Permalink
Typo found, and odd PHP5.6 behaviour counteracted.
Browse files Browse the repository at this point in the history
  • Loading branch information
judgej committed Aug 4, 2018
1 parent a378e23 commit 88fd40e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Message/AuthorizeRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ public function getInfo2Label()
*/
public function setInfo2Label($value)
{
return $this->setParameter('infoLabel', $value);
return $this->setParameter('info2Label', $value);
}

/**
Expand Down
4 changes: 3 additions & 1 deletion src/Message/CaptureRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ public function getData()
// payment types, it actually causes a hash validation error if included.

if ($this->isDirectDebit() || $this->isPaydirekt()) {
$data['purpose'] = substr($purpose, 0, static::PURPOSE_LENGTH);
// PHP 5.6 will return false if $purpose is '', so protect aganst that.

$data['purpose'] = substr($purpose, 0, static::PURPOSE_LENGTH) ?: '';
}
}

Expand Down

0 comments on commit 88fd40e

Please sign in to comment.