Skip to content

Commit

Permalink
Merge pull request #216 from kohlerdominik/fix-issue#214
Browse files Browse the repository at this point in the history
Test ini-parameter for truthy instead of string
  • Loading branch information
sprain committed Feb 21, 2023
2 parents acf35b8 + 00f10a2 commit 75b45a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/PaymentPart/Output/FpdfOutput/FpdfOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private function addSwissQrCodeImage(): void
$yPosQrCode = 209.5 + $this->offsetY;
$xPosQrCode = 67 + $this->offsetX;

if ("1" === ini_get('allow_url_fopen')) {
if ((bool)ini_get('allow_url_fopen')) {
$this->fpdf->Image(
$qrCode->getDataUri($this->getQrCodeImageFormat()),
$xPosQrCode,
Expand Down
2 changes: 1 addition & 1 deletion tests/PaymentPart/Output/FpdfOutput/FpdfOutputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function testItThrowsSvgNotSupportedException(): void

public function testItThrowsUnsupportedEnvironmentException(): void
{
if (ini_get('allow_url_fopen') === "1") {
if ((bool)ini_get('allow_url_fopen')) {
$this->markTestSkipped("This test only works in hardened environment.");
}

Expand Down

0 comments on commit 75b45a0

Please sign in to comment.