Skip to content

Commit 00f10a2

Browse files
committed
Test ini-parameter for truthy instead of string
1 parent acf35b8 commit 00f10a2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/PaymentPart/Output/FpdfOutput/FpdfOutput.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ private function addSwissQrCodeImage(): void
100100
$yPosQrCode = 209.5 + $this->offsetY;
101101
$xPosQrCode = 67 + $this->offsetX;
102102

103-
if ("1" === ini_get('allow_url_fopen')) {
103+
if ((bool)ini_get('allow_url_fopen')) {
104104
$this->fpdf->Image(
105105
$qrCode->getDataUri($this->getQrCodeImageFormat()),
106106
$xPosQrCode,

tests/PaymentPart/Output/FpdfOutput/FpdfOutputTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function testItThrowsSvgNotSupportedException(): void
8080

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

0 commit comments

Comments
 (0)