Skip to content

Commit

Permalink
Test ini-parameter for truthy instead of string
Browse files Browse the repository at this point in the history
  • Loading branch information
kohlerdominik committed Feb 20, 2023
1 parent acf35b8 commit 00f10a2
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 00f10a2

Please sign in to comment.